Skip to content

Commit f75875e

Browse files
authored
simplify additionalItems validation flow (#1256)
1 parent eec384c commit f75875e

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

src/main/java/com/networknt/schema/keyword/ItemsLegacyValidator.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -186,9 +186,7 @@ private boolean doValidate(ExecutionContext executionContext, int i, JsonNode no
186186
executionContext.evaluationPathAddLast("items");
187187
}
188188
} else if (this.additionalItems != null) {
189-
if (this.additionalItems) {
190-
// evaluatedItems.add(path);
191-
} else {
189+
if (!this.additionalItems) {
192190
// no additional item allowed, return error
193191
executionContext.evaluationPathRemoveLast(); // remove items
194192
executionContext.evaluationPathAddLast("additionalItems");

0 commit comments

Comments
 (0)