mirror of https://github.com/apache/lucene.git
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:
parent
ec41521ddb
commit
5f8e983a2c
|
@ -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) {
|
||||
|
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue