Skip to content
This repository has been archived by the owner on Jul 11, 2019. It is now read-only.

Commit

Permalink
Handle null values in CAttributeTuple.isValidValue. Not sure if correct
Browse files Browse the repository at this point in the history
  • Loading branch information
pieterbos committed Jul 19, 2017
1 parent 2a7ca4c commit edeb91d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/main/java/com/nedap/archie/aom/CAttributeTuple.java
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,13 @@ private boolean isValid(ModelInfoLookup lookup, CPrimitiveTuple tuple, HashMap<S
String attributeName = attribute.getRmAttributeName();

CPrimitiveObject cPrimitiveObject = tuple.getMembers().get(index);
if(!cPrimitiveObject.isValidValue(lookup, values.get(attributeName))) {
Object value = values.get(attributeName);
if(value == null) {
return false;
//alternatively, look at occurrences or parent attribute existence?
//not sure if we should in a tuple - a constrained value that is null is generally an error
}
if(!cPrimitiveObject.isValidValue(lookup, value)) {
return false;
}
index++;
Expand Down

0 comments on commit edeb91d

Please sign in to comment.