Fixed null pointer exception

This commit is contained in:
Luca Frosini 2021-03-29 14:13:57 +02:00
parent e90829157a
commit 34d9c0759d
1 changed files with 1 additions and 1 deletions

View File

@ -176,7 +176,7 @@ public class Validator {
// int upperBound = fieldsMandatoryUpperBoundMap.get(entry.getKey());
String maxOccurs = metadataFieldMap.get(entry.getKey()).getMaxOccurs();
int upperBound = Integer.MAX_VALUE;
if(maxOccurs.compareTo("*")==0) {
if(maxOccurs==null || maxOccurs.compareTo("*")==0) {
upperBound = Integer.MAX_VALUE;
}else {
try {