Skip to content

Commit eb970c4

Browse files
committed
clean up
1 parent 8971148 commit eb970c4

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

  • json-schema-validator/src/main/java/io/openapiprocessor/jsonschema/schema

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

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
import java.net.URI;
1414
import java.util.Collection;
1515

16+
import static io.openapiprocessor.jsonschema.support.Null.nonNull;
1617
import static io.openapiprocessor.jsonschema.support.Null.requiresNonNull;
1718

1819
public class ResolverId {
@@ -67,13 +68,13 @@ private void walkBucket (Bucket bucket) {
6768
JsonPointer propLocation = location.append (name);
6869

6970
if (detector.shouldWalkObject(scope, value, propLocation)) {
70-
walkSchema (scope, value, propLocation);
71+
walkSchema (scope, nonNull(value), propLocation);
7172

7273
} else if (detector.shouldWalkArray(scope, value, propLocation)) {
73-
walkSchemaArray (scope, value, propLocation);
74+
walkSchemaArray (scope, nonNull(value), propLocation);
7475

7576
} else if (detector.shouldWalkMap(scope, value, propLocation)) {
76-
walkSchemaMap (scope, value, propLocation);
77+
walkSchemaMap (scope, nonNull(value), propLocation);
7778
}
7879
});
7980
}
@@ -102,8 +103,8 @@ private void walkSchemaArray (Scope currentScope, Object value, JsonPointer loca
102103
}
103104
}
104105

105-
private void walkSchemaMap (Scope currentScope, @Nullable Object value, JsonPointer location) {
106-
Scope targetScope = currentScope.move (requiresNonNull(value));
106+
private void walkSchemaMap (Scope currentScope, Object value, JsonPointer location) {
107+
Scope targetScope = currentScope.move (value);
107108
Bucket bucket = Bucket.createBucket(targetScope, value, location);
108109
if (bucket == null) {
109110
return; // // todo error

0 commit comments

Comments
 (0)