openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ppod...@apache.org
Subject svn commit: r1416742 - /openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/XMLPersistenceMetaDataParser.java
Date Tue, 04 Dec 2012 01:41:27 GMT
Author: ppoddar
Date: Tue Dec  4 01:41:24 2012
New Revision: 1416742

URL: http://svn.apache.org/viewvc?rev=1416742&view=rev
Log:
OPENJPA-2284: Save NPE while parsing cascade

Modified:
    openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/XMLPersistenceMetaDataParser.java

Modified: openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/XMLPersistenceMetaDataParser.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/XMLPersistenceMetaDataParser.java?rev=1416742&r1=1416741&r2=1416742&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/XMLPersistenceMetaDataParser.java
(original)
+++ openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/XMLPersistenceMetaDataParser.java
Tue Dec  4 01:41:24 2012
@@ -1361,10 +1361,8 @@ public class XMLPersistenceMetaDataParse
             return;
 
         ValueMetaData vmd = fmd;
-        switch (_strategy) {
-            case ONE_MANY:
-            case MANY_MANY:
-                vmd = fmd.getElement();
+        if (_strategy == ONE_MANY || _strategy == MANY_MANY) {
+            vmd = fmd.getElement();
         }
         for (CascadeType cascade : cascades) {
             switch (cascade) {



Mime
View raw message