Skip to content

Commit dacaf7f

Browse files
committed
1 parent 1402b7b commit dacaf7f

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

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

+2-8
Original file line numberDiff line numberDiff line change
@@ -28,22 +28,16 @@ new DeprecatedGen<URI>(properties['build.java.runtime'], URI.create("jrt:/"), pr
2828
@Override
2929
protected void collectClasses(URI uri) throws IOException {
3030
Path modules = Paths.get(uri);
31-
PathMatcher fileMatcher = modules.getFileSystem().getPathMatcher("glob:*.class"),
32-
prefixMatcher = modules.getFileSystem().getPathMatcher("glob:/java.**");
31+
PathMatcher fileMatcher = modules.getFileSystem().getPathMatcher("glob:/modules/java.**/*.class");
3332
Files.walkFileTree(modules, new SimpleFileVisitor<Path>() {
3433
@Override
3534
public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {
36-
if (fileMatcher.matches(file.getFileName())) {
35+
if (fileMatcher.matches(file)) {
3736
// System.out.println(file);
3837
Files.newInputStream(file).withStream { parseClass(it) };
3938
}
4039
return FileVisitResult.CONTINUE;
4140
}
42-
43-
@Override
44-
public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) throws IOException {
45-
return (dir.getNameCount() == 0 || prefixMatcher.matches(dir)) ? FileVisitResult.CONTINUE : FileVisitResult.SKIP_SUBTREE;
46-
}
4741
});
4842
}
4943
}.run();

0 commit comments

Comments
 (0)