1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
Description: JDK 13 introduced a source compatibility issue
Quote from the Java release notes:
The addition of newFileSystem(Path, Map<String, ?>) creates a source (but not
binary) compatibility issue for code that has been using the existing 2-arg
newFileSystem(Path, ClassLoader) and specifying the class loader as null. [...]
To avoid the ambiguous reference, this code needs to be modified to cast the
second parameter to java.lang.ClassLoader.
Author: Philipp Wollermann <philwo@google.com>
Origin: upstream, https://github.com/bazelbuild/bazel/commit/0216ee54417fa1f2fef14f6eb14cbc1e8f595821
Forwarded: not-needed
Last-Update: 2022-11-14
--- a/src/java_tools/buildjar/java/com/google/devtools/build/buildjar/VanillaJavaBuilder.java
+++ b/src/java_tools/buildjar/java/com/google/devtools/build/buildjar/VanillaJavaBuilder.java
@@ -78,7 +78,7 @@
private FileSystem getJarFileSystem(Path sourceJar) throws IOException {
FileSystem fs = filesystems.get(sourceJar);
if (fs == null) {
- filesystems.put(sourceJar, fs = FileSystems.newFileSystem(sourceJar, null));
+ filesystems.put(sourceJar, fs = FileSystems.newFileSystem(sourceJar, (ClassLoader) null));
}
return fs;
}
|