Skip to content

Commit

Permalink
Fixes a regex expression bug. When the left-hand side of the operatio…
Browse files Browse the repository at this point in the history
…n is null, always return false rather than throwing an exception. Resolves #4763.

Signed-off-by: David Venable <dlv@amazon.com>
  • Loading branch information
dlvenable committed Aug 1, 2024
1 parent fd87e3d commit 25e2fc0
Show file tree
Hide file tree
Showing 4 changed files with 123 additions and 104 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ public int getSymbol() {
@Override
public Boolean evaluate(final Object ... args) {
checkArgument(args.length == 2, displayName + " requires operands length needs to be 2.");
if(args[0] == null)
return false;
checkArgument(args[0] instanceof String, displayName + " requires left operand to be String.");
checkArgument(args[1] instanceof String, displayName + " requires right operand to be String.");
try {
Expand Down
Loading

0 comments on commit 25e2fc0

Please sign in to comment.