Skip to content

Commit 2b8cb8c

Browse files
committed
Improve Java 9 core module matching
1 parent dacaf7f commit 2b8cb8c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

+3-3
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@ import java.nio.file.PathMatcher;
2424
import java.nio.file.SimpleFileVisitor;
2525
import java.nio.file.attribute.BasicFileAttributes;
2626

27-
new DeprecatedGen<URI>(properties['build.java.runtime'], URI.create("jrt:/"), properties['deprecated.output.file'] as File) {
27+
new DeprecatedGen<URI>(properties['build.java.runtime'], URI.create("jrt:/modules/"), properties['deprecated.output.file'] as File) {
2828
@Override
2929
protected void collectClasses(URI uri) throws IOException {
3030
Path modules = Paths.get(uri);
31-
PathMatcher fileMatcher = modules.getFileSystem().getPathMatcher("glob:/modules/java.**/*.class");
31+
PathMatcher fileMatcher = modules.getFileSystem().getPathMatcher("glob:java.**/*.class");
3232
Files.walkFileTree(modules, new SimpleFileVisitor<Path>() {
3333
@Override
3434
public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {
35-
if (fileMatcher.matches(file)) {
35+
if (fileMatcher.matches(modules.relativize(file))) {
3636
// System.out.println(file);
3737
Files.newInputStream(file).withStream { parseClass(it) };
3838
}

0 commit comments

Comments
 (0)