Fixing validation bug
This commit is contained in:
parent
34d9c0759d
commit
dd8919f9de
|
@ -174,16 +174,20 @@ public class Validator {
|
||||||
int lowerBound = entry.getValue();
|
int lowerBound = entry.getValue();
|
||||||
|
|
||||||
// int upperBound = fieldsMandatoryUpperBoundMap.get(entry.getKey());
|
// int upperBound = fieldsMandatoryUpperBoundMap.get(entry.getKey());
|
||||||
String maxOccurs = metadataFieldMap.get(entry.getKey()).getMaxOccurs();
|
|
||||||
int upperBound = Integer.MAX_VALUE;
|
int upperBound = Integer.MAX_VALUE;
|
||||||
if(maxOccurs==null || maxOccurs.compareTo("*")==0) {
|
try {
|
||||||
upperBound = Integer.MAX_VALUE;
|
String maxOccurs = metadataFieldMap.get(entry.getKey()).getMaxOccurs();
|
||||||
}else {
|
if(maxOccurs==null || maxOccurs.compareTo("*")==0) {
|
||||||
try {
|
upperBound = Integer.MAX_VALUE;
|
||||||
upperBound = Integer.valueOf(maxOccurs);
|
}else {
|
||||||
}catch (Exception e) {
|
try {
|
||||||
|
upperBound = Integer.valueOf(maxOccurs);
|
||||||
|
}catch (Exception e) {
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
}catch (Exception e) {
|
||||||
|
upperBound = Integer.MAX_VALUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
int inserted = numberFieldsMandatorySameKeyMap.get(entry.getKey());
|
int inserted = numberFieldsMandatorySameKeyMap.get(entry.getKey());
|
||||||
|
|
Loading…
Reference in New Issue