Skip to content

Commit

Permalink
advanced matcher casing handling improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Apr 23, 2021
1 parent febdf34 commit 1ae6b5b
Showing 1 changed file with 1 addition and 3 deletions.
Expand Up @@ -717,7 +717,7 @@ else if (asterisk == input.length() - 1) {
result = new PostfixAsteriskMatchHelper(input.substring(0, input.length() - 1));
}
else {
result = new MultipleAsteriskMatchHelper(CoreUtilities.split(input, '*').toArray(new String[0]));
result = new MultipleAsteriskMatchHelper(CoreUtilities.split(CoreUtilities.toLowerCase(input), '*').toArray(new String[0]));
}
}
else {
Expand All @@ -731,7 +731,6 @@ public static boolean runGenericCheck(String matchableValue, String trueValue) {
if (matchableValue == null) {
return false;
}
matchableValue = CoreUtilities.toLowerCase(matchableValue);
trueValue = CoreUtilities.toLowerCase(trueValue);
MatchHelper matcher = createMatcher(matchableValue);
return matcher.doesMatch(trueValue);
Expand All @@ -745,7 +744,6 @@ public static boolean runGenericSwitchCheck(ScriptPath path, String switchName,
if (value == null) {
return false;
}
with = CoreUtilities.toLowerCase(with);
value = CoreUtilities.toLowerCase(value);
MatchHelper matcher = createMatcher(with);
return matcher.doesMatch(value);
Expand Down

0 comments on commit 1ae6b5b

Please sign in to comment.