mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-15 20:25:17 +03:00
32 lines
1.6 KiB
Diff
32 lines
1.6 KiB
Diff
From: philwo <philwo@google.com>
|
|
Date: Mon, 8 Feb 2021 10:45:50 -0800
|
|
Subject: [PATCH] Fix Bazel #10214: JDK 13 introduced a source compatibility
|
|
issue.
|
|
Upstream: yes (https://github.com/bazelbuild/bazel/commit/0216ee54417fa1f2fef14f6eb14cbc1e8f595821)
|
|
|
|
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.
|
|
|
|
RELNOTES:
|
|
PiperOrigin-RevId: 356301318
|
|
---
|
|
.../com/google/devtools/build/buildjar/VanillaJavaBuilder.java | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git 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
|
|
index b2a4da2aaa..d63bd8485e 100644
|
|
--- 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 @@ public class VanillaJavaBuilder implements Closeable {
|
|
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;
|
|
}
|
|
--
|
|
2.31.1
|
|
|