openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hthom...@apache.org
Subject svn commit: r1419734 - in /openjpa/branches/2.1.x: ./ openjpa-persistence/src/main/java/org/apache/openjpa/persistence/XMLPersistenceMetaDataParser.java
Date Mon, 10 Dec 2012 20:31:59 GMT
Author: hthomann
Date: Mon Dec 10 20:31:59 2012
New Revision: 1419734

URL: http://svn.apache.org/viewvc?rev=1419734&view=rev
Log:
OPENJPA-2284: Save NPE while parsing cascade - back ported to 2.1.x Pinaki's commit to trunk.

Modified:
    openjpa/branches/2.1.x/   (props changed)
    openjpa/branches/2.1.x/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/XMLPersistenceMetaDataParser.java

Propchange: openjpa/branches/2.1.x/
------------------------------------------------------------------------------
  Merged /openjpa/branches/2.0.x:r1419659
  Merged /openjpa/trunk:r1416742

Modified: openjpa/branches/2.1.x/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/XMLPersistenceMetaDataParser.java
URL: http://svn.apache.org/viewvc/openjpa/branches/2.1.x/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/XMLPersistenceMetaDataParser.java?rev=1419734&r1=1419733&r2=1419734&view=diff
==============================================================================
--- openjpa/branches/2.1.x/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/XMLPersistenceMetaDataParser.java
(original)
+++ openjpa/branches/2.1.x/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/XMLPersistenceMetaDataParser.java
Mon Dec 10 20:31:59 2012
@@ -1230,10 +1230,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