Skip to content

Commit 1778aa3

Browse files
committed
formating correctly
1 parent 85fef1e commit 1778aa3

File tree

2 files changed

+10
-11
lines changed

2 files changed

+10
-11
lines changed

src/main/java/com/networknt/schema/BaseJsonValidator.java

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -61,18 +61,17 @@ protected boolean hasSubSchema() {
6161
return subSchema != null;
6262
}
6363

64-
6564
protected JsonSchema obainSubSchemaNode(JsonNode schemaNode){
66-
JsonNode node = schemaNode.get("id");
67-
if(node == null) return null;
65+
JsonNode node = schemaNode.get("id");
66+
if(node == null) return null;
6867

69-
try {
70-
JsonSchemaFactory factory = new JsonSchemaFactory();
71-
URL url = new URL(node.textValue());
72-
return factory.getSchema(url);
73-
} catch (MalformedURLException e) {
74-
return null;
75-
}
68+
try {
69+
JsonSchemaFactory factory = new JsonSchemaFactory();
70+
URL url = new URL(node.textValue());
71+
return factory.getSchema(url);
72+
} catch (MalformedURLException e) {
73+
return null;
74+
}
7675
}
7776

7877
public Set<ValidationMessage> validate(JsonNode node) {

src/main/java/com/networknt/schema/JsonSchema.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public JsonNode getRefSchemaNode(String ref) {
8080
node = schemaNode.get(key);
8181
}
8282
if (node == null && schema.hasSubSchema()){
83-
node = schema.getSubSchema().getRefSchemaNode(ref);
83+
node = schema.getSubSchema().getRefSchemaNode(ref);
8484
}
8585
}
8686
}

0 commit comments

Comments
 (0)