Details
-
Bug
-
Resolution: Fixed
-
P3
-
9, 17
Backports
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8324695 | 17.0.12-oracle | Ravi Reddy | P3 | Resolved | Fixed | b02 |
JDK-8331138 | 17.0.12 | Amos SHI | P3 | Resolved | Fixed | b01 |
JDK-8324697 | 11.0.24-oracle | Ravi Reddy | P3 | Resolved | Fixed | b02 |
JDK-8331258 | 11.0.24 | Amos SHI | P3 | Resolved | Fixed | b01 |
Description
$ java -cp classes:provider.jar -Djava.nio.file.spi.DefaultFileSystemProvider=TestProvider org.test.Test
Exception in thread "main" java.lang.Error: java.lang.NullPointerException: Cannot invoke "java.nio.file.FileSystem.getPath(String, String[])" because the return value of "java.nio.file.FileSystems.getDefault()" is null
at java.base/java.nio.file.FileSystems$DefaultFileSystemHolder.getDefaultProvider(FileSystems.java:133)
at java.base/java.nio.file.FileSystems$DefaultFileSystemHolder$1.run(FileSystems.java:102)
at java.base/java.nio.file.FileSystems$DefaultFileSystemHolder$1.run(FileSystems.java:100)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:312)
at java.base/java.nio.file.FileSystems$DefaultFileSystemHolder.defaultFileSystem(FileSystems.java:100)
at java.base/java.nio.file.FileSystems$DefaultFileSystemHolder.<clinit>(FileSystems.java:94)
at java.base/java.nio.file.FileSystems.getDefault(FileSystems.java:182)
at org.test.Test.main(Test.java:7)
Caused by: java.lang.NullPointerException: Cannot invoke "java.nio.file.FileSystem.getPath(String, String[])" because the return value of "java.nio.file.FileSystems.getDefault()" is null
at java.base/java.io.File.toPath(File.java:2318)
at java.base/java.util.zip.ZipFile$Source.get(ZipFile.java:1246)
at java.base/java.util.zip.ZipFile$CleanableResource.<init>(ZipFile.java:707)
at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:241)
at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:172)
at java.base/java.util.jar.JarFile.<init>(JarFile.java:349)
at java.base/jdk.internal.loader.URLClassPath$JarLoader.getJarFile(URLClassPath.java:816)
at java.base/jdk.internal.loader.URLClassPath$JarLoader$1.run(URLClassPath.java:761)
at java.base/jdk.internal.loader.URLClassPath$JarLoader$1.run(URLClassPath.java:754)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:691)
at java.base/jdk.internal.loader.URLClassPath$JarLoader.ensureOpen(URLClassPath.java:753)
at java.base/jdk.internal.loader.URLClassPath$JarLoader.<init>(URLClassPath.java:728)
at java.base/jdk.internal.loader.URLClassPath$3.run(URLClassPath.java:496)
at java.base/jdk.internal.loader.URLClassPath$3.run(URLClassPath.java:479)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:691)
at java.base/jdk.internal.loader.URLClassPath.getLoader(URLClassPath.java:478)
at java.base/jdk.internal.loader.URLClassPath.getLoader(URLClassPath.java:447)
at java.base/jdk.internal.loader.URLClassPath.getResource(URLClassPath.java:316)
at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:750)
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:676)
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:634)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:182)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:519)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:466)
at java.base/java.nio.file.FileSystems$DefaultFileSystemHolder.getDefaultProvider(FileSystems.java:123)
... 7 more
Attachments
Issue Links
- backported by
-
JDK-8324695 NPE when creating default file system when default file system provider is packaged as JAR file on class path
- Resolved
-
JDK-8324697 NPE when creating default file system when default file system provider is packaged as JAR file on class path
- Resolved
-
JDK-8331138 NPE when creating default file system when default file system provider is packaged as JAR file on class path
- Resolved
-
JDK-8331258 NPE when creating default file system when default file system provider is packaged as JAR file on class path
- Resolved
- relates to
-
JDK-8271740 OS/X Custom DefaultFileSystemProvider errors at current jdk17, jdk18
- Closed
- links to
-
Commit openjdk/jdk11u-dev/d42634bd
-
Commit openjdk/jdk17u-dev/b13cb2f5
-
Commit openjdk/jdk/717792c3
-
Review openjdk/jdk11u-dev/2647
-
Review openjdk/jdk17u-dev/2390
-
Review openjdk/jdk/5103