[Git][java-team/libnb-javaparser-java][master] Fixed the build failure with OpenJDK 17 (Closes: #982025)

Emmanuel Bourg gitlab at salsa.debian.org
Sat Apr 17 20:26:53 BST 2021



Emmanuel Bourg pushed to branch master at Debian Java Maintainers / libnb-javaparser-java


Commits:
75dd3b9c by Emmanuel Bourg at 2021-04-17T21:24:01+02:00
Fixed the build failure with OpenJDK 17 (Closes: #982025)

- - - - -


3 changed files:

- debian/changelog
- + debian/patches/01-java17-compatibility.patch
- + debian/patches/series


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,10 @@
+libnb-javaparser-java (9+2018-2) unstable; urgency=medium
+
+  * Team upload.
+  * Fixed the build failure with OpenJDK 17 (Closes: #982025)
+
+ -- Emmanuel Bourg <ebourg at apache.org>  Sat, 17 Apr 2021 21:23:50 +0200
+
 libnb-javaparser-java (9+2018-1) unstable; urgency=medium
 
   * Team upload.


=====================================
debian/patches/01-java17-compatibility.patch
=====================================
@@ -0,0 +1,45 @@
+Description: Fixes the compatibility with OpenJDK 17
+Author: Emmanuel Bourg <ebourg at apache.org>
+Forwarded: no
+--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/file/JavacFileManager.java
++++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/file/JavacFileManager.java
+@@ -516,7 +516,7 @@
+                 Assert.checkNonNull(jarFSProvider, "should have been caught before!");
+                 this.fileSystem = jarFSProvider.newFileSystem(archivePath, env);
+             } else {
+-                this.fileSystem = FileSystems.newFileSystem(archivePath, null);
++                this.fileSystem = FileSystems.newFileSystem(archivePath, (ClassLoader) null);
+             }
+             packages = new HashMap<>();
+             for (Path root : fileSystem.getRootDirectories()) {
+--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/file/Locations.java
++++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/file/Locations.java
+@@ -377,7 +377,7 @@
+                         /* Not a recognized extension; open it to see if
+                          it looks like a valid zip file. */
+                         try {
+-                            FileSystems.newFileSystem(file, null).close();
++                            FileSystems.newFileSystem(file, (ClassLoader) null).close();
+                             if (warn) {
+                                 log.warning(Lint.LintCategory.PATH,
+                                         "unexpected.archive.file", file);
+--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/platform/JDKPlatformProvider.java
++++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/platform/JDKPlatformProvider.java
+@@ -74,7 +74,7 @@
+         SUPPORTED_JAVA_PLATFORM_VERSIONS = new TreeSet<>();
+         Path ctSymFile = findCtSym();
+         if (Files.exists(ctSymFile)) {
+-            try (FileSystem fs = FileSystems.newFileSystem(ctSymFile, null);
++            try (FileSystem fs = FileSystems.newFileSystem(ctSymFile, (ClassLoader) null);
+                  DirectoryStream<Path> dir =
+                          Files.newDirectoryStream(fs.getRootDirectories().iterator().next())) {
+                 for (Path section : dir) {
+@@ -119,7 +119,7 @@
+                 FileSystem fs = ctSym2FileSystem.get(file);
+                 if (fs == null) {
+                     try {
+-                        ctSym2FileSystem.put(file, fs = FileSystems.newFileSystem(file, null));
++                        ctSym2FileSystem.put(file, fs = FileSystems.newFileSystem(file, (ClassLoader) null));
+                     } catch (IOException ex) {
+                         throw new IllegalStateException(ex);
+                     }


=====================================
debian/patches/series
=====================================
@@ -0,0 +1 @@
+01-java17-compatibility.patch



View it on GitLab: https://salsa.debian.org/java-team/libnb-javaparser-java/-/commit/75dd3b9c28edc26953192f4fd81e60122a93ed02

-- 
View it on GitLab: https://salsa.debian.org/java-team/libnb-javaparser-java/-/commit/75dd3b9c28edc26953192f4fd81e60122a93ed02
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-java-commits/attachments/20210417/b19d0e72/attachment.htm>


More information about the pkg-java-commits mailing list