Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle the situation when context class loader is null (#490)
This fixes the errors when trying to load classpath references, like: Caused by: java.lang.NullPointerException at com.networknt.schema.uri.ClasspathURLStreamHandler$ClassPathURLConnection.getResourceAsStream(ClasspathURLStreamHandler.java:83) ~[amcrm-1.0-SNAPSHOT.jar:?] at com.networknt.schema.uri.ClasspathURLStreamHandler$ClassPathURLConnection.getInputStream(ClasspathURLStreamHandler.java:69) ~[amcrm-1.0-SNAPSHOT.jar:?] at java.net.URL.openStream(URL.java:1165) ~[?:?] at com.networknt.schema.uri.ClasspathURLFetcher.fetch(ClasspathURLFetcher.java:39) ~[amcrm-1.0-SNAPSHOT.jar:?] at com.networknt.schema.uri.URISchemeFetcher.fetch(URISchemeFetcher.java:50) ~[amcrm-1.0-SNAPSHOT.jar:?] at com.networknt.schema.JsonSchemaFactory.getSchema(JsonSchemaFactory.java:351) ~[amcrm-1.0-SNAPSHOT.jar:?] at com.networknt.schema.RefValidator.getRefSchema(RefValidator.java:82) ~[amcrm-1.0-SNAPSHOT.jar:?] at com.networknt.schema.RefValidator.<init>(RefValidator.java:45) ~[amcrm-1.0-SNAPSHOT.jar:?] Co-authored-by: Viacheslav Tykhanovskyi <viacheslav.tykhanovskyi@multisafepay.com>
- Loading branch information