directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fel...@apache.org
Subject svn commit: r592754 - /directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/aci/ProtectedItem.java
Date Wed, 07 Nov 2007 14:20:22 GMT
Author: felixk
Date: Wed Nov  7 06:20:21 2007
New Revision: 592754

URL: http://svn.apache.org/viewvc?rev=592754&view=rev
Log:
equals() method does not check for null argument

This implementation of equals(Object) violates the contract defined by java.lang.Object.equals()
because it does not check for null being passed as the argument. All equals() methods should
return false if passed a null value. 

Modified:
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/aci/ProtectedItem.java

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/aci/ProtectedItem.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/aci/ProtectedItem.java?rev=592754&r1=592753&r2=592754&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/aci/ProtectedItem.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/aci/ProtectedItem.java
Wed Nov  7 06:20:21 2007
@@ -233,6 +233,11 @@
             {
                 return true;
             }
+            
+            if (o == null )
+            {
+                return false;
+            }
 
             if ( getClass().isAssignableFrom( o.getClass() ) )
             {



Mime
View raw message