openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From allee8...@apache.org
Subject svn commit: r1361285 - in /openjpa: branches/2.2.x/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/StateManagerImpl.java trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/StateManagerImpl.java
Date Fri, 13 Jul 2012 16:22:17 GMT
Author: allee8285
Date: Fri Jul 13 16:22:16 2012
New Revision: 1361285

URL: http://svn.apache.org/viewvc?rev=1361285&view=rev
Log:
OPENJPA-2199 - Guard null pc value.

Modified:
    openjpa/branches/2.2.x/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/StateManagerImpl.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/StateManagerImpl.java

Modified: openjpa/branches/2.2.x/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/StateManagerImpl.java
URL: http://svn.apache.org/viewvc/openjpa/branches/2.2.x/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/StateManagerImpl.java?rev=1361285&r1=1361284&r2=1361285&view=diff
==============================================================================
--- openjpa/branches/2.2.x/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/StateManagerImpl.java
(original)
+++ openjpa/branches/2.2.x/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/StateManagerImpl.java
Fri Jul 13 16:22:16 2012
@@ -3204,11 +3204,13 @@ public class StateManagerImpl
      * field manager.
      */
     void provideField(PersistenceCapable pc, FieldManager store, int field) {
-        FieldManager beforeFM = _fm;
-        _fm = store;
-        pc.pcProvideField(field);
-        // Retaining original FM because of the possibility of reentrant calls
-        if (beforeFM != null) _fm = beforeFM;
+        if (pc != null) {
+            FieldManager beforeFM = _fm;
+            _fm = store;
+            pc.pcProvideField(field);
+            // Retaining original FM because of the possibility of reentrant calls
+            if (beforeFM != null) _fm = beforeFM;
+        }
     }
 
     /**

Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/StateManagerImpl.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/StateManagerImpl.java?rev=1361285&r1=1361284&r2=1361285&view=diff
==============================================================================
--- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/StateManagerImpl.java
(original)
+++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/StateManagerImpl.java
Fri Jul 13 16:22:16 2012
@@ -3205,11 +3205,13 @@ public class StateManagerImpl
      * field manager.
      */
     void provideField(PersistenceCapable pc, FieldManager store, int field) {
-        FieldManager beforeFM = _fm;
-        _fm = store;
-        pc.pcProvideField(field);
-        // Retaining original FM because of the possibility of reentrant calls
-        if (beforeFM != null) _fm = beforeFM;
+        if (pc != null) {
+            FieldManager beforeFM = _fm;
+            _fm = store;
+            pc.pcProvideField(field);
+            // Retaining original FM because of the possibility of reentrant calls
+            if (beforeFM != null) _fm = beforeFM;
+        }
     }
 
     /**



Mime
View raw message