Skip to content

Commit

Permalink
Improve Java 9 core module matching
Browse files Browse the repository at this point in the history
  • Loading branch information
uschindler committed Aug 23, 2015
1 parent dacaf7f commit 2b8cb8c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/tools/groovy/generate-deprecated-java9.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ import java.nio.file.PathMatcher;
import java.nio.file.SimpleFileVisitor;
import java.nio.file.attribute.BasicFileAttributes;

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

0 comments on commit 2b8cb8c

Please sign in to comment.