commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r1295651 - /commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/AccessibleObjectsRegistry.java
Date Thu, 01 Mar 2012 16:16:15 GMT
Author: simonetripodi
Date: Thu Mar  1 16:16:14 2012
New Revision: 1295651

URL: http://svn.apache.org/viewvc?rev=1295651&view=rev
Log:
AccessibleObjectDescriptor#equals checks first if the instances are the same, so no needs
to compare strings etc.

Modified:
    commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/AccessibleObjectsRegistry.java

Modified: commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/AccessibleObjectsRegistry.java
URL: http://svn.apache.org/viewvc/commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/AccessibleObjectsRegistry.java?rev=1295651&r1=1295650&r2=1295651&view=diff
==============================================================================
--- commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/AccessibleObjectsRegistry.java
(original)
+++ commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/AccessibleObjectsRegistry.java
Thu Mar  1 16:16:14 2012
@@ -532,6 +532,11 @@ abstract class AccessibleObjectsRegistry
         @Override
         public boolean equals( Object obj )
         {
+            if ( this == obj )
+            {
+                return true;
+            }
+
             AccessibleObjectDescriptor other = (AccessibleObjectDescriptor) obj;
 
             if ( type != other.type )



Mime
View raw message