We are seeing this error in our build system:
An exception has occurred in the compiler (25.0.3). Please file a bug against the Java compiler via the Java bug reporting page (https://bugreport.java.com) after checking the Bug Database (https://bugs.java.com) for duplicates. Include your program, the following diagnostic, and the parameters passed to the Java compiler in your report. Thank you.
java.lang.UnsupportedOperationException
at jdk.zipfs/jdk.nio.zipfs.ZipFileSystemProvider.getZipFileSystem(ZipFileSystemProvider.java:127)
at jdk.zipfs/jdk.nio.zipfs.ZipFileSystemProvider.newFileSystem(ZipFileSystemProvider.java:117)
at jdk.compiler/com.sun.tools.javac.file.Locations$ModulePathLocationHandler$ModulePathIterator.inferModuleName(Locations.java:1466)
at jdk.compiler/com.sun.tools.javac.file.Locations$ModulePathLocationHandler$ModulePathIterator.scanFile(Locations.java:1358)
at jdk.compiler/com.sun.tools.javac.file.Locations$ModulePathLocationHandler$ModulePathIterator.hasNext(Locations.java:1279)
at jdk.compiler/com.sun.tools.javac.util.Iterators$CompoundIterator.hasNext(Iterators.java:72)
at jdk.compiler/com.sun.tools.javac.code.ModuleFinder$ModuleLocationIterator.hasNext(ModuleFinder.java:135)
at jdk.compiler/com.sun.tools.javac.code.ModuleFinder.scanModulePath(ModuleFinder.java:295)
at jdk.compiler/com.sun.tools.javac.code.ModuleFinder.findAllModules(ModuleFinder.java:188)
at jdk.compiler/com.sun.tools.javac.comp.Modules.getUnnamedModuleCompleter(Modules.java:1469)
at jdk.compiler/com.sun.tools.javac.comp.Modules.setCompilationUnitModules(Modules.java:531)
at jdk.compiler/com.sun.tools.javac.comp.Modules.enter(Modules.java:278)
at jdk.compiler/com.sun.tools.javac.comp.Modules.initModules(Modules.java:239)
at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.initModules(JavaCompiler.java:1047)
at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:941)
at jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:319)
at jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:178)
at jdk.compiler/com.sun.tools.javac.Main.compile(Main.java:84)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
at java.base/java.lang.reflect.Method.invoke(Method.java:565)
at com.oracle.mxtool.compilerserver.JavacDaemon$JavacCompiler.compile(JavacDaemon.java:35)
at com.oracle.mxtool.compilerserver.CompilerDaemon$Connection.run(CompilerDaemon.java:172)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:545)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:328)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1090)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:614)
at java.base/java.lang.Thread.run(Thread.java:1474)
Unfortunately, the ZipException cause is swallowed[1] so it's not clear what the problem is. Could it be set as the cause of the UnsupportedOperationException?
diff --git a/src/jdk.zipfs/share/classes/jdk/nio/zipfs/ZipFileSystemProvider.java b/src/jdk.zipfs/share/classes/jdk/nio/zipfs/ZipFileSystemProvider.java
index a8336b0f8f6..377bc2fdf68 100644
--- a/src/jdk.zipfs/share/classes/jdk/nio/zipfs/ZipFileSystemProvider.java
+++ b/src/jdk.zipfs/share/classes/jdk/nio/zipfs/ZipFileSystemProvider.java
@@ -124,7 +124,7 @@ private ZipFileSystem getZipFileSystem(Path path, Map<String, ?> env) throws IOE
String pname = path.toString();
if (pname.endsWith(".zip") || pname.endsWith(".jar"))
throw ze;
- throw new UnsupportedOperationException();
+ throw new UnsupportedOperationException(String.valueOf(path), ze);
}
}
[1] https://github.com/openjdk/jdk/blob/9c83dff811c038ba8b20a9781ea3ac0f4f95b1b9/src/jdk.zipfs/share/classes/jdk/nio/zipfs/ZipFileSystemProvider.java#L127
An exception has occurred in the compiler (25.0.3). Please file a bug against the Java compiler via the Java bug reporting page (https://bugreport.java.com) after checking the Bug Database (https://bugs.java.com) for duplicates. Include your program, the following diagnostic, and the parameters passed to the Java compiler in your report. Thank you.
java.lang.UnsupportedOperationException
at jdk.zipfs/jdk.nio.zipfs.ZipFileSystemProvider.getZipFileSystem(ZipFileSystemProvider.java:127)
at jdk.zipfs/jdk.nio.zipfs.ZipFileSystemProvider.newFileSystem(ZipFileSystemProvider.java:117)
at jdk.compiler/com.sun.tools.javac.file.Locations$ModulePathLocationHandler$ModulePathIterator.inferModuleName(Locations.java:1466)
at jdk.compiler/com.sun.tools.javac.file.Locations$ModulePathLocationHandler$ModulePathIterator.scanFile(Locations.java:1358)
at jdk.compiler/com.sun.tools.javac.file.Locations$ModulePathLocationHandler$ModulePathIterator.hasNext(Locations.java:1279)
at jdk.compiler/com.sun.tools.javac.util.Iterators$CompoundIterator.hasNext(Iterators.java:72)
at jdk.compiler/com.sun.tools.javac.code.ModuleFinder$ModuleLocationIterator.hasNext(ModuleFinder.java:135)
at jdk.compiler/com.sun.tools.javac.code.ModuleFinder.scanModulePath(ModuleFinder.java:295)
at jdk.compiler/com.sun.tools.javac.code.ModuleFinder.findAllModules(ModuleFinder.java:188)
at jdk.compiler/com.sun.tools.javac.comp.Modules.getUnnamedModuleCompleter(Modules.java:1469)
at jdk.compiler/com.sun.tools.javac.comp.Modules.setCompilationUnitModules(Modules.java:531)
at jdk.compiler/com.sun.tools.javac.comp.Modules.enter(Modules.java:278)
at jdk.compiler/com.sun.tools.javac.comp.Modules.initModules(Modules.java:239)
at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.initModules(JavaCompiler.java:1047)
at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:941)
at jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:319)
at jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:178)
at jdk.compiler/com.sun.tools.javac.Main.compile(Main.java:84)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
at java.base/java.lang.reflect.Method.invoke(Method.java:565)
at com.oracle.mxtool.compilerserver.JavacDaemon$JavacCompiler.compile(JavacDaemon.java:35)
at com.oracle.mxtool.compilerserver.CompilerDaemon$Connection.run(CompilerDaemon.java:172)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:545)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:328)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1090)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:614)
at java.base/java.lang.Thread.run(Thread.java:1474)
Unfortunately, the ZipException cause is swallowed[1] so it's not clear what the problem is. Could it be set as the cause of the UnsupportedOperationException?
diff --git a/src/jdk.zipfs/share/classes/jdk/nio/zipfs/ZipFileSystemProvider.java b/src/jdk.zipfs/share/classes/jdk/nio/zipfs/ZipFileSystemProvider.java
index a8336b0f8f6..377bc2fdf68 100644
--- a/src/jdk.zipfs/share/classes/jdk/nio/zipfs/ZipFileSystemProvider.java
+++ b/src/jdk.zipfs/share/classes/jdk/nio/zipfs/ZipFileSystemProvider.java
@@ -124,7 +124,7 @@ private ZipFileSystem getZipFileSystem(Path path, Map<String, ?> env) throws IOE
String pname = path.toString();
if (pname.endsWith(".zip") || pname.endsWith(".jar"))
throw ze;
- throw new UnsupportedOperationException();
+ throw new UnsupportedOperationException(String.valueOf(path), ze);
}
}
[1] https://github.com/openjdk/jdk/blob/9c83dff811c038ba8b20a9781ea3ac0f4f95b1b9/src/jdk.zipfs/share/classes/jdk/nio/zipfs/ZipFileSystemProvider.java#L127
- links to
-
Review(master)
openjdk/jdk/29646