Skip to content

Commit

Permalink
Merge pull request #2144 from IBM/johntimm-main
Browse files Browse the repository at this point in the history
Issue #1980 - changed over validateCode to use normalize
  • Loading branch information
JohnTimm committed Mar 25, 2021
2 parents 4b5a8ce + 54dabe5 commit 1ebdc5b
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -352,10 +352,11 @@ private static Expansion.Contains unwrap(Contains contains) {
}

private static boolean validateCode(Map<java.lang.String, Set<java.lang.String>> codeSetMap, Code code) {
java.lang.String codeString = (code != null) ? code.getValue() : null;
if (codeString != null) {
java.lang.String codeValue = (code != null) ? code.getValue() : null;
if (codeValue != null) {
java.lang.String normalizedCodeValue = normalize(codeValue);
for (Set<java.lang.String> codeSet : codeSetMap.values()) {
if (codeSet.contains(codeString) || codeSet.contains(codeString.toLowerCase())) {
if (codeSet.contains(codeValue) || codeSet.contains(normalizedCodeValue)) {
return true;
}
}
Expand Down

0 comments on commit 1ebdc5b

Please sign in to comment.