Skip to content

Commit 1b5a1ec

Browse files
committed
Small improvement to only scan the /modules folder and not everything in earlier Java versions
1 parent 3bf31a3 commit 1b5a1ec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/tools/groovy/generate-deprecated-java9.groovy

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import java.nio.file.attribute.BasicFileAttributes;
2727
new DeprecatedGen<URI>(properties['build.java.runtime'], URI.create("jrt:/"), properties['deprecated.output.file'] as File) {
2828
@Override
2929
protected void collectClasses(URI uri) throws IOException {
30-
Path modules = Paths.get(uri);
30+
Path modules = Paths.get(uri).getRoot().resolve('modules'); // needed for Java 9-12 only, but does not hurt!
3131
PathMatcher fileMatcher = modules.getFileSystem().getPathMatcher("glob:/modules/java.**/*.class");
3232
Files.walkFileTree(modules, new SimpleFileVisitor<Path>() {
3333
@Override

0 commit comments

Comments
 (0)