Skip to content

Commit 1f32f35

Browse files
committed
Rename JsonNodeResult to SchemaResult
1 parent ad5a1ff commit 1f32f35

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
package com.networknt.schema;
1818

1919
import com.networknt.schema.annotation.Annotations;
20-
import com.networknt.schema.result.JsonNodeResults;
20+
import com.networknt.schema.result.SchemaResults;
2121
import com.networknt.schema.walk.WalkConfig;
2222

2323
import java.util.ArrayList;
@@ -35,7 +35,7 @@ public class ExecutionContext {
3535

3636
private Stack<DiscriminatorContext> discriminatorContexts = null;
3737
private Annotations annotations = null;
38-
private JsonNodeResults results = null;
38+
private SchemaResults results = null;
3939
private List<Error> errors = new ArrayList<>();
4040

4141
/**
@@ -148,9 +148,9 @@ public Annotations getAnnotations() {
148148
return annotations;
149149
}
150150

151-
public JsonNodeResults getResults() {
151+
public SchemaResults getResults() {
152152
if (this.results == null) {
153-
this.results = new JsonNodeResults();
153+
this.results = new SchemaResults();
154154
}
155155
return results;
156156
}

src/main/java/com/networknt/schema/result/JsonNodeResult.java renamed to src/main/java/com/networknt/schema/result/SchemaResult.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@
2323
/**
2424
* Sub schema results.
2525
*/
26-
public class JsonNodeResult {
26+
public class SchemaResult {
2727
private final NodePath instanceLocation;
2828
private final SchemaLocation schemaLocation;
2929
private final NodePath evaluationPath;
3030
private final boolean valid;
3131

32-
public JsonNodeResult(NodePath instanceLocation, SchemaLocation schemaLocation, NodePath evaluationPath,
32+
public SchemaResult(NodePath instanceLocation, SchemaLocation schemaLocation, NodePath evaluationPath,
3333
boolean valid) {
3434
super();
3535
this.instanceLocation = instanceLocation;
@@ -73,7 +73,7 @@ public boolean equals(Object obj) {
7373
return false;
7474
if (getClass() != obj.getClass())
7575
return false;
76-
JsonNodeResult other = (JsonNodeResult) obj;
76+
SchemaResult other = (SchemaResult) obj;
7777
return Objects.equals(evaluationPath, other.evaluationPath)
7878
&& Objects.equals(instanceLocation, other.instanceLocation)
7979
&& Objects.equals(schemaLocation, other.schemaLocation) && valid == other.valid;

src/main/java/com/networknt/schema/result/JsonNodeResults.java renamed to src/main/java/com/networknt/schema/result/SchemaResults.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,24 +26,24 @@
2626
/**
2727
* Sub schema results.
2828
*/
29-
public class JsonNodeResults {
29+
public class SchemaResults {
3030

3131
/**
3232
* Stores the invalid results.
3333
*/
34-
private final Map<NodePath, List<JsonNodeResult>> values = new HashMap<>();
34+
private final Map<NodePath, List<SchemaResult>> values = new HashMap<>();
3535

3636
public void setResult(NodePath instanceLocation, SchemaLocation schemaLocation, NodePath evaluationPath,
3737
boolean valid) {
38-
JsonNodeResult result = new JsonNodeResult(instanceLocation, schemaLocation, evaluationPath, valid);
39-
List<JsonNodeResult> v = values.computeIfAbsent(instanceLocation, k -> new ArrayList<>());
38+
SchemaResult result = new SchemaResult(instanceLocation, schemaLocation, evaluationPath, valid);
39+
List<SchemaResult> v = values.computeIfAbsent(instanceLocation, k -> new ArrayList<>());
4040
v.add(result);
4141
}
4242

4343
public boolean isValid(NodePath instanceLocation, NodePath evaluationPath) {
44-
List<JsonNodeResult> instance = values.get(instanceLocation);
44+
List<SchemaResult> instance = values.get(instanceLocation);
4545
if (instance != null) {
46-
for (JsonNodeResult result : instance) {
46+
for (SchemaResult result : instance) {
4747
if (evaluationPath.startsWith(result.getEvaluationPath())) {
4848
if(!result.isValid()) {
4949
return false;

0 commit comments

Comments
 (0)