Skip to content

Commit

Permalink
fix for equals call on closure-proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
wizzardo committed May 25, 2024
1 parent 8046bd6 commit c7c14ed
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -924,7 +924,8 @@ public Object invoke(Object proxy, Method method, Object[] args) {
// closureArgs[j].set(args[j]);
// }
if (args.length == 1 && method.getName().equals("equals")) {
return closure.equals(args[0]);
Object other = args[0];
return other != null && other.equals(closure);
} else if (args.length == 0 && method.getName().equals("hashCode")) {
return closure.hashCode();
} else if (args.length == 0 && method.getName().equals("toString")) {
Expand Down

0 comments on commit c7c14ed

Please sign in to comment.