From 4841db826fec6fed370083e899e1dfb62a405592 Mon Sep 17 00:00:00 2001 From: irengrig Date: Wed, 11 Jan 2017 14:46:52 +0100 Subject: [PATCH] json schema: JsonSchemaReader, simplify code --- .../com/jetbrains/jsonSchema/impl/JsonSchemaReader.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/json/src/com/jetbrains/jsonSchema/impl/JsonSchemaReader.java b/json/src/com/jetbrains/jsonSchema/impl/JsonSchemaReader.java index 5bcf9bfd5b47..3588ce9806fb 100644 --- a/json/src/com/jetbrains/jsonSchema/impl/JsonSchemaReader.java +++ b/json/src/com/jetbrains/jsonSchema/impl/JsonSchemaReader.java @@ -139,12 +139,9 @@ public class JsonSchemaReader { if (current.getRef() != null) { final JsonSchemaObject definition = findDefinition(myKey, current.getRef(), root, definitions); if (definition == null) { - if (definitions == null) { - // just skip current item - current.setRef(null); - continue; - } - throw new RuntimeException("Can not find definition: " + current.getRef()); + // just skip current item + current.setRef(null); + continue; } if (definition.getRef() != null && !"#".equals(definition.getRef())) { queue.addFirst(current);