From 63bf89149de5f895538421f8d67693450209e9b9 Mon Sep 17 00:00:00 2001 From: Jozsef Borcsok Date: Thu, 8 Feb 2018 11:14:50 +0100 Subject: [PATCH] using class loader of SchemaVersion (instead of JsonLoader) --- src/main/java/com/github/fge/jsonschema/SchemaVersion.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/github/fge/jsonschema/SchemaVersion.java b/src/main/java/com/github/fge/jsonschema/SchemaVersion.java index eaad50e2..f23be447 100644 --- a/src/main/java/com/github/fge/jsonschema/SchemaVersion.java +++ b/src/main/java/com/github/fge/jsonschema/SchemaVersion.java @@ -25,6 +25,7 @@ import java.io.IOException; import java.net.URI; +import java.net.URL; /** * JSON Schema versions @@ -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); }