Skip to content

Commit e12b10a

Browse files
committed
Loading a JSON schema will now set setPreloadJsonSchema to false to improve loading performance.
Signed-off-by: Yan Wittmann <mail@yanwittmann.de>
1 parent fb32a2c commit e12b10a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/main/java/org/cyclonedx/CycloneDxSchema.java

+2
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,8 @@ public JsonSchema getJsonSchema(CycloneDxSchema.Version schemaVersion, final Obj
118118
{
119119
final InputStream spdxInstream = getJsonSchemaAsStream(schemaVersion);
120120
final SchemaValidatorsConfig config = new SchemaValidatorsConfig();
121+
config.setPreloadJsonSchema(false);
122+
121123
final Map<String, String> offlineMappings = new HashMap<>();
122124
offlineMappings.put("http://cyclonedx.org/schema/spdx.schema.json",
123125
getClass().getClassLoader().getResource("spdx.schema.json").toExternalForm());

0 commit comments

Comments
 (0)