Skip to content

Commit 1495c86

Browse files
committed
clean up
1 parent c60c12a commit 1495c86

File tree

1 file changed

+2
-5
lines changed
  • json-schema-validator/src/main/java/io/openapiprocessor/jsonschema/schema

1 file changed

+2
-5
lines changed

json-schema-validator/src/main/java/io/openapiprocessor/jsonschema/schema/SchemaStore.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -266,18 +266,15 @@ private SchemaVersion getMetaSchemaVersion(URI schemaUri, SchemaVersion version)
266266
throw new RuntimeException ();
267267
}
268268

269-
if (!isObject(document))
270-
return null;
271-
272-
return asObject(document);
269+
return asObjectOrNull(document);
273270
}
274271

275272
private Vocabularies getVocabularies (Map<String, @Nullable Object> document, SchemaVersion version) {
276273
Object vocabularyValue = document.get(Keywords.VOCABULARY);
277274
if (!isObject(vocabularyValue))
278275
return Vocabularies.ALL;
279276

280-
Map<String, Object> vocabularyObject = (Map<String, Object>)asObject(vocabularyValue);
277+
Map<String, Object> vocabularyObject = asObject(vocabularyValue);
281278

282279
Map<URI, Boolean> vocabularies = new LinkedHashMap<> ();
283280
vocabularyObject.forEach ((propKey, propValue) -> {

0 commit comments

Comments
 (0)