openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From curti...@apache.org
Subject svn commit: r1198786 - /openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCRegistry.java
Date Mon, 07 Nov 2011 15:44:59 GMT
Author: curtisr7
Date: Mon Nov  7 15:44:58 2011
New Revision: 1198786

URL: http://svn.apache.org/viewvc?rev=1198786&view=rev
Log:
OPENJPA-2042: Fix possible NPE.

Modified:
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCRegistry.java

Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCRegistry.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCRegistry.java?rev=1198786&r1=1198785&r2=1198786&view=diff
==============================================================================
--- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCRegistry.java
(original)
+++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCRegistry.java
Mon Nov  7 15:44:58 2011
@@ -206,8 +206,11 @@ public class PCRegistry {
             _metas.put(pcClass, meta);
         }
         synchronized (_listeners) {
-            for (RegisterClassListener r : _listeners)
-                r.register(pcClass);
+            for (RegisterClassListener r : _listeners){
+                if (r != null) {
+                    r.register(pcClass);
+                }
+            }
         }
     }
 



Mime
View raw message