harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From odea...@apache.org
Subject svn commit: r823222 - /harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/javax/security/auth/PrivateCredentialPermission.java
Date Thu, 08 Oct 2009 16:31:36 GMT
Author: odeakin
Date: Thu Oct  8 16:31:35 2009
New Revision: 823222

URL: http://svn.apache.org/viewvc?rev=823222&view=rev
Log:
Add null check to equals() method.

Modified:
    harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/javax/security/auth/PrivateCredentialPermission.java

Modified: harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/javax/security/auth/PrivateCredentialPermission.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/javax/security/auth/PrivateCredentialPermission.java?rev=823222&r1=823221&r2=823222&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/javax/security/auth/PrivateCredentialPermission.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/javax/security/auth/PrivateCredentialPermission.java
Thu Oct  8 16:31:35 2009
@@ -375,6 +375,9 @@
         // Checks two CredOwner objects for equality. 
         @Override
         public boolean equals(Object obj) {
+            if (obj == null) {
+                return false;
+            }
             return principalClass.equals(((CredOwner) obj).principalClass)
                     && principalName.equals(((CredOwner) obj).principalName);
         }



Mime
View raw message