Skip to content

Commit 0bde6bd

Browse files
committed
fix: check for null schema in URI
closes #9
1 parent 7b83205 commit 0bde6bd

File tree

1 file changed

+1
-1
lines changed
  • src/main/java/io/zenwave360/jsonrefparser/parser

1 file changed

+1
-1
lines changed

src/main/java/io/zenwave360/jsonrefparser/parser/Parser.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public static void withResourceClassLoader(ClassLoader resourceClassLoader) {
4242
}
4343

4444
public static ExtendedJsonContext parse(URI uri) throws IOException {
45-
if("classpath".contentEquals(uri.getScheme())) {
45+
if(uri.getScheme() != null && "classpath".contentEquals(uri.getScheme())) {
4646
try(var inputStream = resourceClassLoader.getResourceAsStream(uri.getPath().replaceFirst("^/", ""))) {
4747
return parse(inputStream, uri);
4848
}

0 commit comments

Comments
 (0)