Skip to content

Commit 162b968

Browse files
NativeImageResourceFileSystem should throw NPE when uri is null.
1 parent 65df3ec commit 162b968

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/jdk/resources/NativeImageResourceFileSystemProvider.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,9 @@ public FileSystem newFileSystem(Path path, Map<String, ?> env) {
140140
public FileSystem getFileSystem(URI uri) {
141141
try {
142142
readLock.lock();
143+
if (uri == null) {
144+
throw new NullPointerException();
145+
}
143146
if (fileSystem == null) {
144147
throw new FileSystemNotFoundException("The Native Image Resource File System is not present. " +
145148
"Please create a new file system using the `newFileSystem` operation before attempting any file system operations on resource URIs.");

0 commit comments

Comments
 (0)