Merge remote-tracking branch 'origin/master' into i18n
This commit is contained in:
commit
f5a7961ef7
|
@ -254,16 +254,28 @@ public class JsonParser extends ParserBase {
|
|||
JsonElement main = object.has(name) ? object.get(name) : null;
|
||||
JsonElement fork = object.has("_"+name) ? object.get("_"+name) : null;
|
||||
if (main != null || fork != null) {
|
||||
if (property.isList() && ((main == null) || (main instanceof JsonArray)) &&((fork == null) || (fork instanceof JsonArray)) ) {
|
||||
JsonArray arr1 = (JsonArray) main;
|
||||
JsonArray arr2 = (JsonArray) fork;
|
||||
for (int i = 0; i < Math.max(arrC(arr1), arrC(arr2)); i++) {
|
||||
JsonElement m = arrI(arr1, i);
|
||||
JsonElement f = arrI(arr2, i);
|
||||
parseChildPrimitiveInstance(context, property, name, npath, m, f);
|
||||
}
|
||||
} else
|
||||
if (property.isList()) {
|
||||
boolean ok = true;
|
||||
if (!(main == null || main instanceof JsonArray)) {
|
||||
logError(line(main), col(main), npath, IssueType.INVALID, "This property must be an Array, not a "+describe(main), IssueSeverity.ERROR);
|
||||
ok = false;
|
||||
}
|
||||
if (!(fork == null || fork instanceof JsonArray)) {
|
||||
logError(line(fork), col(fork), npath, IssueType.INVALID, "This base property must be an Array, not a "+describe(main), IssueSeverity.ERROR);
|
||||
ok = false;
|
||||
}
|
||||
if (ok) {
|
||||
JsonArray arr1 = (JsonArray) main;
|
||||
JsonArray arr2 = (JsonArray) fork;
|
||||
for (int i = 0; i < Math.max(arrC(arr1), arrC(arr2)); i++) {
|
||||
JsonElement m = arrI(arr1, i);
|
||||
JsonElement f = arrI(arr2, i);
|
||||
parseChildPrimitiveInstance(context, property, name, npath, m, f);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
parseChildPrimitiveInstance(context, property, name, npath, main, fork);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -324,7 +324,7 @@ public class ValidationTestSuite implements IEvaluationContext, IValidatorResour
|
|||
}
|
||||
}
|
||||
}
|
||||
if (TestingUtilities.context(version).isNoTerminologyServer() || !focus.has("tx-dependent")) {
|
||||
if (!TestingUtilities.context(version).isNoTerminologyServer() || !focus.has("tx-dependent")) {
|
||||
Assert.assertEquals("Expected "+Integer.toString(java.get("errorCount").getAsInt())+" errors, but found "+Integer.toString(ec)+".", java.get("errorCount").getAsInt(), ec);
|
||||
if (java.has("warningCount"))
|
||||
Assert.assertEquals("Expected "+Integer.toString(java.get("warningCount").getAsInt())+" warnings, but found "+Integer.toString(wc)+".", java.get("warningCount").getAsInt(), wc);
|
||||
|
|
Loading…
Reference in New Issue