openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From curti...@apache.org
Subject svn commit: r1021400 - in /openjpa/trunk: openjpa-kernel/src/main/java/org/apache/openjpa/kernel/ openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/kernel/
Date Mon, 11 Oct 2010 16:04:58 GMT
Author: curtisr7
Date: Mon Oct 11 16:04:58 2010
New Revision: 1021400

URL: http://svn.apache.org/viewvc?rev=1021400&view=rev
Log:
 OPENJPA-1644: Don't clear values from a deleted instnace.

Modified:
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/EDeletedState.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/PDeletedState.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/PNewDeletedState.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/PNewFlushedDeletedState.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/kernel/TestTransition2.java

Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/EDeletedState.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/EDeletedState.java?rev=1021400&r1=1021399&r2=1021400&view=diff
==============================================================================
--- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/EDeletedState.java
(original)
+++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/EDeletedState.java
Mon Oct 11 16:04:58 2010
@@ -30,12 +30,10 @@ class EDeletedState
     extends PCState {
 
     PCState commit(StateManagerImpl context) {
-        context.clearFields();
         return TRANSIENT;
     }
 
     PCState commitRetain(StateManagerImpl context) {
-        context.clearFields();
         return TRANSIENT;
     }
 

Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/PDeletedState.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/PDeletedState.java?rev=1021400&r1=1021399&r2=1021400&view=diff
==============================================================================
--- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/PDeletedState.java
(original)
+++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/PDeletedState.java
Mon Oct 11 16:04:58 2010
@@ -38,12 +38,10 @@ class PDeletedState
     }
 
     PCState commit(StateManagerImpl context) {
-        context.clearFields();
         return TRANSIENT;
     }
 
     PCState commitRetain(StateManagerImpl context) {
-        context.clearFields();
         return TRANSIENT;
     }
 

Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/PNewDeletedState.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/PNewDeletedState.java?rev=1021400&r1=1021399&r2=1021400&view=diff
==============================================================================
--- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/PNewDeletedState.java
(original)
+++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/PNewDeletedState.java
Mon Oct 11 16:04:58 2010
@@ -30,12 +30,10 @@ class PNewDeletedState
     extends PCState {
 
     PCState commit(StateManagerImpl context) {
-        context.clearFields();
         return TRANSIENT;
     }
 
     PCState commitRetain(StateManagerImpl context) {
-        context.clearFields();
         return TRANSIENT;
     }
 

Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/PNewFlushedDeletedState.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/PNewFlushedDeletedState.java?rev=1021400&r1=1021399&r2=1021400&view=diff
==============================================================================
--- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/PNewFlushedDeletedState.java
(original)
+++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/PNewFlushedDeletedState.java
Mon Oct 11 16:04:58 2010
@@ -34,12 +34,10 @@ class PNewFlushedDeletedState
     }
 
     PCState commit(StateManagerImpl context) {
-        context.clearFields();
         return TRANSIENT;
     }
 
     PCState commitRetain(StateManagerImpl context) {
-        context.clearFields();
         return TRANSIENT;
     }
 

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/kernel/TestTransition2.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/kernel/TestTransition2.java?rev=1021400&r1=1021399&r2=1021400&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/kernel/TestTransition2.java
(original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/kernel/TestTransition2.java
Mon Oct 11 16:04:58 2010
@@ -518,10 +518,10 @@ public class TestTransition2 extends Bas
         // parent should be valid
         assertEquals("PARENT", parent.getStringField());
 
-        // 'b' should be cleared
-        assertNull(b.getStringField());
-        assertEquals(0, b.getIntField());
-        assertNull(b.getSelfOneOne());
+        // 'b' should not be cleared JPA 2.0 "3.2.3 Removal"
+        assertNotNull(b.getStringField());
+        assertNotEquals(0, b.getIntField());
+        assertNotNull(b.getSelfOneOne());
     }
 
     /**
@@ -643,10 +643,10 @@ public class TestTransition2 extends Bas
         // parent should be valid
         assertEquals("PARENT", parent.getStringField());
 
-        // 'b' should be cleared
-        assertNull(b.getStringField());
-        assertEquals(0, b.getIntField());
-        assertNull(b.getSelfOneOne());
+        // 'b' should not be cleared JPA 2.0 "3.2.3 Removal"
+        assertNotNull(b.getStringField());
+        assertNotEquals(0, b.getIntField());
+        assertNotNull(b.getSelfOneOne());
     }
 
     /**



Mime
View raw message