Skip to content
This repository was archived by the owner on Jul 30, 2021. It is now read-only.

Commit 61f5173

Browse files
committed
-storing project compile and test source roots in variable and move unchecked annotation to declaration
1 parent 90d9f46 commit 61f5173

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

src/main/java/com/mysema/maven/apt/AbstractProcessorMojo.java

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -448,28 +448,31 @@ protected Set<File> getSourceDirectories() {
448448
return directories;
449449
}
450450

451-
@SuppressWarnings("unchecked")
451+
452452
private List<String> getTestCompileSourceRoots() {
453+
@SuppressWarnings("unchecked")
454+
final List<String> testCompileSourceRoots = project.getTestCompileSourceRoots();
453455
if (additionalTestSourceRoots == null) {
454-
return project.getTestCompileSourceRoots();
456+
return testCompileSourceRoots;
455457
}
456458
if (getLog().isDebugEnabled()) {
457459
getLog().debug("Adding additional test source roots: " + Joiner.on(", ").skipNulls().join(additionalTestSourceRoots));
458460
}
459-
List<String> sourceRoots = new ArrayList<String>(project.getTestCompileSourceRoots());
461+
List<String> sourceRoots = new ArrayList<String>(testCompileSourceRoots);
460462
sourceRoots.addAll(additionalTestSourceRoots);
461463
return sourceRoots;
462464
}
463465

464-
@SuppressWarnings("unchecked")
465466
private List<String> getCompileSourceRoots() {
467+
@SuppressWarnings("unchecked")
468+
final List<String> compileSourceRoots = project.getCompileSourceRoots();
466469
if (additionalSourceRoots == null) {
467-
return project.getCompileSourceRoots();
470+
return compileSourceRoots;
468471
}
469472
if (getLog().isDebugEnabled()) {
470473
getLog().debug("Adding additional source roots: " + Joiner.on(", ").skipNulls().join(additionalSourceRoots));
471474
}
472-
List<String> sourceRoots = new ArrayList<String>(project.getCompileSourceRoots());
475+
List<String> sourceRoots = new ArrayList<String>(compileSourceRoots);
473476
sourceRoots.addAll(additionalSourceRoots);
474477
return sourceRoots;
475478
}

0 commit comments

Comments
 (0)