JsonSchemaObject (@NotNull JsonValueAdapter value, List<JsonSchemaObject> anyOf) { final List<JsonSchemaAnnotatorChecker> candidateErroneousCheckers = new ArrayList<>(); final List<JsonSchemaObject> candidateErroneousSchemas = new ArrayList<>(); for (JsonSchemaObject object : anyOf) { final JsonSchemaAnnotatorChecker checker = new JsonSchemaAnnotatorChecker(myProject, myOptions); checker.checkByScheme(value, object); if (checker.isCorrect()) { return object; } // maybe we still find the correct schema - continue to iterate candidateErroneousCheckers.add(checker); candidateErroneousSchemas.add(object); } return showErrorsAndGetLeastErroneous(candidateErroneousCheckers, candidateErroneousSchemas, false); }