tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jlaskow...@apache.org
Subject svn commit: r606054 - /openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/OpenEjb2Conversion.java
Date Thu, 20 Dec 2007 23:22:10 GMT
Author: jlaskowski
Date: Thu Dec 20 15:22:09 2007
New Revision: 606054

URL: http://svn.apache.org/viewvc?rev=606054&view=rev
Log:
Avoid NPE (it seems to have broken Geronimo build today)

Modified:
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/OpenEjb2Conversion.java

Modified: openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/OpenEjb2Conversion.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/OpenEjb2Conversion.java?rev=606054&r1=606053&r2=606054&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/OpenEjb2Conversion.java
(original)
+++ openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/OpenEjb2Conversion.java
Thu Dec 20 15:22:09 2007
@@ -230,8 +230,10 @@
 
     public void mergeEntityMappings(String moduleId, EntityMappings entityMappings, OpenejbJar
openejbJar, OpenejbJarType openejbJarType) {
         Map<String, EntityData> entities =  new TreeMap<String, EntityData>();
-        for (Entity entity : entityMappings.getEntity()) {
-            entities.put(entity.getDescription(), new EntityData(entity));
+        if (entityMappings != null) {
+            for (Entity entity : entityMappings.getEntity()) {
+                entities.put(entity.getDescription(), new EntityData(entity));
+            }
         }
         for (org.apache.openejb.jee.oejb2.EnterpriseBean enterpriseBean : openejbJarType.getEnterpriseBeans())
{
             if (!(enterpriseBean instanceof EntityBeanType)) {



Mime
View raw message