From 563cfec449ffa8269f1a5288115cec8ac2bbf9e5 Mon Sep 17 00:00:00 2001 From: redmitry Date: Wed, 15 Nov 2023 11:02:52 +0100 Subject: [PATCH] "forgotten" boolean return --- .../java/es/elixir/bsc/json/schema/model/JsonSchema.java | 6 +++--- .../bsc/json/schema/model/impl/AbstractJsonSchema.java | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/es/elixir/bsc/json/schema/model/JsonSchema.java b/src/main/java/es/elixir/bsc/json/schema/model/JsonSchema.java index 03625dc..29a89bf 100644 --- a/src/main/java/es/elixir/bsc/json/schema/model/JsonSchema.java +++ b/src/main/java/es/elixir/bsc/json/schema/model/JsonSchema.java @@ -45,9 +45,9 @@ public interface JsonSchema extends JsonSchemaElement { public final static String RECURSIVE_ANCHOR = "$recursiveAnchor"; public final static String VOCABULARY = "$vocabulary"; - void validate(JsonValue value, List errors, JsonSchemaValidationCallback callback) throws ValidationException; + boolean validate(JsonValue value, List errors, JsonSchemaValidationCallback callback) throws ValidationException; - default void validate(JsonValue value, List errors) { - validate(value, errors, null); + default boolean validate(JsonValue value, List errors) { + return validate(value, errors, null); } } diff --git a/src/main/java/es/elixir/bsc/json/schema/model/impl/AbstractJsonSchema.java b/src/main/java/es/elixir/bsc/json/schema/model/impl/AbstractJsonSchema.java index 7da8b6c..c8ad49d 100644 --- a/src/main/java/es/elixir/bsc/json/schema/model/impl/AbstractJsonSchema.java +++ b/src/main/java/es/elixir/bsc/json/schema/model/impl/AbstractJsonSchema.java @@ -65,9 +65,9 @@ public abstract boolean validate(String jsonPointer, JsonValue value, JsonValue throws ValidationException; @Override - public void validate(JsonValue value, List errors, + public boolean validate(JsonValue value, List errors, JsonSchemaValidationCallback callback) throws ValidationException { - validate("", value, null, new ArrayList(), errors, callback); + return validate("", value, null, new ArrayList(), errors, callback); } }