You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by mb...@apache.org on 2009/10/14 16:16:50 UTC
svn commit: r825148 -
/commons/proper/collections/trunk/src/java/org/apache/commons/collections/functors/NOPClosure.java
Author: mbenson
Date: Wed Oct 14 14:16:50 2009
New Revision: 825148
URL: http://svn.apache.org/viewvc?rev=825148&view=rev
Log:
[COLLECTIONS-340]
Modified:
commons/proper/collections/trunk/src/java/org/apache/commons/collections/functors/NOPClosure.java
Modified: commons/proper/collections/trunk/src/java/org/apache/commons/collections/functors/NOPClosure.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/java/org/apache/commons/collections/functors/NOPClosure.java?rev=825148&r1=825147&r2=825148&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/java/org/apache/commons/collections/functors/NOPClosure.java (original)
+++ commons/proper/collections/trunk/src/java/org/apache/commons/collections/functors/NOPClosure.java Wed Oct 14 14:16:50 2009
@@ -38,7 +38,7 @@
/**
* Factory returning the singleton instance.
- *
+ *
* @return the singleton instance
* @since Commons Collections 3.1
*/
@@ -56,7 +56,7 @@
/**
* Do nothing.
- *
+ *
* @param input the input object
*/
public void execute(E input) {
@@ -68,6 +68,12 @@
*/
@Override
public boolean equals(Object arg0) {
+ if (arg0 == this) {
+ return true;
+ }
+ if (arg0 instanceof NOPClosure == false) {
+ return false;
+ }
return arg0.hashCode() == this.hashCode();
}