IDEA-CR-57054 simplify and fix the blinking test

GitOrigin-RevId: 9c3baeb6e85e31fd73f9b26c8eae3d6f0ab204b9
This commit is contained in:
Anton Lobov
2019-12-31 10:04:42 +00:00
committed by intellij-monorepo-bot
parent 76ed4a9b85
commit fd34271b0f
@@ -159,12 +159,8 @@ class JsonSchemaAnnotatorChecker {
boolean checkedObject = false;
if (type != null) {
JsonSchemaType schemaType = getMatchingSchemaType(schema, type);
if (schemaType != null && !schemaType.equals(type)) {
JsonSchemaType altType = value.getAlternateType(type);
JsonSchemaType matchingAltType = getMatchingSchemaType(schema, altType);
if (altType == type || matchingAltType != null && !schemaType.equals(matchingAltType)) {
typeError(value.getDelegate(), altType, getExpectedTypes(Collections.singleton(schema)));
}
if (schemaType != null && !schemaType.equals(type) && !schemaType.equals(value.getAlternateType(type))) {
typeError(value.getDelegate(), value.getAlternateType(type), getExpectedTypes(Collections.singleton(schema)));
}
else {
if (JsonSchemaType._string_number.equals(type)) {