Adapt for Java 11 (add java.util.Objects) to signatures: Implement MMapDirectory with Java 20 Project Panama Preview API (#12188)

This commit is contained in:
Uwe Schindler 2023-03-09 21:34:23 +01:00
parent ec41521ddb
commit 5f8e983a2c
3 changed files with 1 additions and 1 deletions

View File

@ -48,7 +48,7 @@ public final class ExtractForeignAPI {
}
var outputPath = Paths.get(args[1]);
var javaBaseModule = Paths.get(URI.create("jrt:/")).resolve("java.base").toRealPath();
var fileMatcher = javaBaseModule.getFileSystem().getPathMatcher("glob:java/{lang/foreign/*,nio/channels/FileChannel}.class");
var fileMatcher = javaBaseModule.getFileSystem().getPathMatcher("glob:java/{lang/foreign/*,nio/channels/FileChannel,util/Objects}.class");
try (var out = new ZipOutputStream(Files.newOutputStream(outputPath)); var stream = Files.walk(javaBaseModule)) {
var filesToExtract = stream.map(javaBaseModule::relativize).filter(fileMatcher::matches).sorted().collect(Collectors.toList());
for (Path relative : filesToExtract) {