commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brit...@apache.org
Subject svn commit: r1441775 - /commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/AccessibleObjectsRegistry.java
Date Sat, 02 Feb 2013 17:21:33 GMT
Author: britter
Date: Sat Feb  2 17:21:33 2013
New Revision: 1441775

URL: http://svn.apache.org/viewvc?rev=1441775&view=rev
Log:
JiraSandbox433TestCase occasional fails when the WeakHashMap used for caching has already
lost the reference to a key. It may happen that it tries to invoke equals with null on an
AccessibleObjectDescriptor, resulting in a NullPointerException.

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=1441775&r1=1441774&r2=1441775&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
Sat Feb  2 17:21:33 2013
@@ -534,6 +534,10 @@ abstract class AccessibleObjectsRegistry
             {
                 return true;
             }
+            if( obj == null )
+            {
+                return false;
+            }
 
             AccessibleObjectDescriptor other = (AccessibleObjectDescriptor) obj;
 



Mime
View raw message