Skip to content

Commit

Permalink
using class loader of SchemaVersion (instead of JsonLoader)
Browse files Browse the repository at this point in the history
  • Loading branch information
borcsokj authored and Capstan committed Oct 29, 2019
1 parent 1ffdc48 commit 63bf891
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/java/com/github/fge/jsonschema/SchemaVersion.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

import java.io.IOException;
import java.net.URI;
import java.net.URL;

/**
* JSON Schema versions
Expand Down Expand Up @@ -61,7 +62,8 @@ public enum SchemaVersion
{
try {
location = URI.create(uri);
schema = JsonLoader.fromResource(resource);
final URL url = SchemaVersion.class.getResource(resource);
schema = JsonLoader.fromURL(url);
} catch (IOException e) {
throw new ExceptionInInitializerError(e);
}
Expand Down

0 comments on commit 63bf891

Please sign in to comment.