Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
-
None
Description
Equals method of NOPClosure class doesn't follow objects equals contract. It isn't symmetric nor transitive and it is just plain wrong.
Following code evaluates to true on most (if not all) JVM implementations:
NOPClosure.INSTANCE.equals(new Integer(System.identityHashCode(NOPClosure.INSTANCE)))