Fixing the NPE in the InstanceValidator
This commit is contained in:
parent
1aff132691
commit
baf53efd32
|
@ -2561,19 +2561,23 @@ public class InstanceValidator extends BaseValidator implements IResourceValidat
|
|||
break;
|
||||
case CHOICE:
|
||||
String itemType=validateQuestionnaireResponseItemType(errors, answer, ns, "Coding", "date", "time", "integer", "string");
|
||||
if (itemType.equals("Coding")) validateAnswerCode(errors, answer, ns, qsrc, qItem, false);
|
||||
else if (itemType.equals("date")) checkOption(errors, answer, ns, qsrc, qItem, "date");
|
||||
else if (itemType.equals("time")) checkOption(errors, answer, ns, qsrc, qItem, "time");
|
||||
else if (itemType.equals("integer")) checkOption(errors, answer, ns, qsrc, qItem, "integer");
|
||||
else if (itemType.equals("string")) checkOption(errors, answer, ns, qsrc, qItem, "string");
|
||||
if (itemType != null) {
|
||||
if (itemType.equals("Coding")) validateAnswerCode(errors, answer, ns, qsrc, qItem, false);
|
||||
else if (itemType.equals("date")) checkOption(errors, answer, ns, qsrc, qItem, "date");
|
||||
else if (itemType.equals("time")) checkOption(errors, answer, ns, qsrc, qItem, "time");
|
||||
else if (itemType.equals("integer")) checkOption(errors, answer, ns, qsrc, qItem, "integer");
|
||||
else if (itemType.equals("string")) checkOption(errors, answer, ns, qsrc, qItem, "string");
|
||||
}
|
||||
break;
|
||||
case OPENCHOICE:
|
||||
itemType=validateQuestionnaireResponseItemType(errors, answer, ns, "Coding", "date", "time", "integer", "string");
|
||||
if (itemType.equals("Coding")) validateAnswerCode(errors, answer, ns, qsrc, qItem, true);
|
||||
else if (itemType.equals("date")) checkOption(errors, answer, ns, qsrc, qItem, "date");
|
||||
else if (itemType.equals("time")) checkOption(errors, answer, ns, qsrc, qItem, "time");
|
||||
else if (itemType.equals("integer")) checkOption(errors, answer, ns, qsrc, qItem, "integer");
|
||||
else if (itemType.equals("string")) checkOption(errors, answer, ns, qsrc, qItem, "string", true);
|
||||
if (itemType != null) {
|
||||
if (itemType.equals("Coding")) validateAnswerCode(errors, answer, ns, qsrc, qItem, true);
|
||||
else if (itemType.equals("date")) checkOption(errors, answer, ns, qsrc, qItem, "date");
|
||||
else if (itemType.equals("time")) checkOption(errors, answer, ns, qsrc, qItem, "time");
|
||||
else if (itemType.equals("integer")) checkOption(errors, answer, ns, qsrc, qItem, "integer");
|
||||
else if (itemType.equals("string")) checkOption(errors, answer, ns, qsrc, qItem, "string", true);
|
||||
}
|
||||
break;
|
||||
case QUESTION:
|
||||
case NULL:
|
||||
|
|
Loading…
Reference in New Issue