db-jdo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c..@apache.org
Subject svn commit: r454538 - in /db/jdo: branches/2.0.1/tck20/src/java/org/apache/jdo/tck/lifecycle/StateTransitions.java trunk/tck20/src/java/org/apache/jdo/tck/lifecycle/StateTransitions.java
Date Mon, 09 Oct 2006 22:42:58 GMT
Author: clr
Date: Mon Oct  9 15:42:57 2006
New Revision: 454538

URL: http://svn.apache.org/viewvc?view=rev&rev=454538
Log:
JDO-419 JDO-424 Changed state transition table to use UNSPECIFIED where the specification
is unclear

Modified:
    db/jdo/branches/2.0.1/tck20/src/java/org/apache/jdo/tck/lifecycle/StateTransitions.java
    db/jdo/trunk/tck20/src/java/org/apache/jdo/tck/lifecycle/StateTransitions.java

Modified: db/jdo/branches/2.0.1/tck20/src/java/org/apache/jdo/tck/lifecycle/StateTransitions.java
URL: http://svn.apache.org/viewvc/db/jdo/branches/2.0.1/tck20/src/java/org/apache/jdo/tck/lifecycle/StateTransitions.java?view=diff&rev=454538&r1=454537&r2=454538
==============================================================================
--- db/jdo/branches/2.0.1/tck20/src/java/org/apache/jdo/tck/lifecycle/StateTransitions.java
(original)
+++ db/jdo/branches/2.0.1/tck20/src/java/org/apache/jdo/tck/lifecycle/StateTransitions.java
Mon Oct  9 15:42:57 2006
@@ -127,6 +127,7 @@
     private static final int ERROR                       = -2;
     private static final int IMPOSSIBLE                  = -3;
     private static final int NOT_APPLICABLE              = -4;
+    private static final int UNSPECIFIED                 = -5;
 
     /**
      * State transitions
@@ -238,7 +239,7 @@
         // read field with active optimistic transaction
         {   UNCHANGED,                      UNCHANGED,                          UNCHANGED,
             UNCHANGED,                      PERSISTENT_NONTRANSACTIONAL,        UNCHANGED,
-            UNCHANGED,                      ERROR,                              ERROR,
+            UNCHANGED,                      UNSPECIFIED,                        UNSPECIFIED,
             UNCHANGED,                      UNCHANGED,                          UNCHANGED,
             UNCHANGED},
 
@@ -251,7 +252,7 @@
         // read field with active datastore transaction
         {   UNCHANGED,                      UNCHANGED,                          UNCHANGED,
             UNCHANGED,                      PERSISTENT_CLEAN,                   UNCHANGED,
-            UNCHANGED,                      ERROR,                              ERROR,
+            UNCHANGED,                      UNSPECIFIED,                        UNSPECIFIED,
             PERSISTENT_CLEAN,               UNCHANGED,                          UNCHANGED,
             UNCHANGED},
 
@@ -297,18 +298,18 @@
         //  DETACHED_DIRTY
         
         // detachCopy outside tx
-        {   ERROR,                          IMPOSSIBLE,                         IMPOSSIBLE,
-            IMPOSSIBLE,                     UNCHANGED,                          IMPOSSIBLE,
+        {   UNSPECIFIED,                    IMPOSSIBLE,                         IMPOSSIBLE,
+            IMPOSSIBLE,                     UNSPECIFIED,                        IMPOSSIBLE,
             IMPOSSIBLE,                     IMPOSSIBLE,                         IMPOSSIBLE,
             UNCHANGED,                      ERROR,                              UNCHANGED,
             UNCHANGED},
 
         // detachCopy with active tx
         {   PERSISTENT_NEW,                 UNCHANGED,                          UNCHANGED,
-            UNCHANGED,                      UNCHANGED,                          PERSISTENT_NEW,
+            UNCHANGED,                      UNSPECIFIED,                        PERSISTENT_NEW,
             PERSISTENT_NEW,                 ERROR,                              ERROR,
-            UNCHANGED,                      ERROR,                              UNCHANGED,
-            UNCHANGED},
+            UNSPECIFIED,                    ERROR,                              UNSPECIFIED,
+            UNSPECIFIED},
 
         // serialize outside tx
         {   UNCHANGED,                      IMPOSSIBLE,                         IMPOSSIBLE,
@@ -493,6 +494,7 @@
                 expected_state = transitions[operation][current_state];
                 if( expected_state == IMPOSSIBLE ) continue;
                 if( expected_state == NOT_APPLICABLE ) continue;
+                if( expected_state == UNSPECIFIED ) continue;
                 if( expected_state == UNCHANGED ) expected_state = current_state;
                 try {
                     transaction = pm.currentTransaction();

Modified: db/jdo/trunk/tck20/src/java/org/apache/jdo/tck/lifecycle/StateTransitions.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/tck20/src/java/org/apache/jdo/tck/lifecycle/StateTransitions.java?view=diff&rev=454538&r1=454537&r2=454538
==============================================================================
--- db/jdo/trunk/tck20/src/java/org/apache/jdo/tck/lifecycle/StateTransitions.java (original)
+++ db/jdo/trunk/tck20/src/java/org/apache/jdo/tck/lifecycle/StateTransitions.java Mon Oct
 9 15:42:57 2006
@@ -127,6 +127,7 @@
     private static final int ERROR                       = -2;
     private static final int IMPOSSIBLE                  = -3;
     private static final int NOT_APPLICABLE              = -4;
+    private static final int UNSPECIFIED                 = -5;
 
     /**
      * State transitions
@@ -238,7 +239,7 @@
         // read field with active optimistic transaction
         {   UNCHANGED,                      UNCHANGED,                          UNCHANGED,
             UNCHANGED,                      PERSISTENT_NONTRANSACTIONAL,        UNCHANGED,
-            UNCHANGED,                      ERROR,                              ERROR,
+            UNCHANGED,                      UNSPECIFIED,                        UNSPECIFIED,
             UNCHANGED,                      UNCHANGED,                          UNCHANGED,
             UNCHANGED},
 
@@ -251,7 +252,7 @@
         // read field with active datastore transaction
         {   UNCHANGED,                      UNCHANGED,                          UNCHANGED,
             UNCHANGED,                      PERSISTENT_CLEAN,                   UNCHANGED,
-            UNCHANGED,                      ERROR,                              ERROR,
+            UNCHANGED,                      UNSPECIFIED,                        UNSPECIFIED,
             PERSISTENT_CLEAN,               UNCHANGED,                          UNCHANGED,
             UNCHANGED},
 
@@ -297,18 +298,18 @@
         //  DETACHED_DIRTY
         
         // detachCopy outside tx
-        {   ERROR,                          IMPOSSIBLE,                         IMPOSSIBLE,
-            IMPOSSIBLE,                     UNCHANGED,                          IMPOSSIBLE,
+        {   UNSPECIFIED,                    IMPOSSIBLE,                         IMPOSSIBLE,
+            IMPOSSIBLE,                     UNSPECIFIED,                        IMPOSSIBLE,
             IMPOSSIBLE,                     IMPOSSIBLE,                         IMPOSSIBLE,
             UNCHANGED,                      ERROR,                              UNCHANGED,
             UNCHANGED},
 
         // detachCopy with active tx
         {   PERSISTENT_NEW,                 UNCHANGED,                          UNCHANGED,
-            UNCHANGED,                      UNCHANGED,                          PERSISTENT_NEW,
+            UNCHANGED,                      UNSPECIFIED,                        PERSISTENT_NEW,
             PERSISTENT_NEW,                 ERROR,                              ERROR,
-            UNCHANGED,                      ERROR,                              UNCHANGED,
-            UNCHANGED},
+            UNSPECIFIED,                    ERROR,                              UNSPECIFIED,
+            UNSPECIFIED},
 
         // serialize outside tx
         {   UNCHANGED,                      IMPOSSIBLE,                         IMPOSSIBLE,
@@ -493,6 +494,7 @@
                 expected_state = transitions[operation][current_state];
                 if( expected_state == IMPOSSIBLE ) continue;
                 if( expected_state == NOT_APPLICABLE ) continue;
+                if( expected_state == UNSPECIFIED ) continue;
                 if( expected_state == UNCHANGED ) expected_state = current_state;
                 try {
                     transaction = pm.currentTransaction();



Mime
View raw message