You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jdo-commits@db.apache.org by cl...@apache.org on 2021/05/07 23:12:19 UTC
[db-jdo] 37/43: JDO-419 JDO-424 Changed state transition table to
use UNSPECIFIED where the specification is unclear
This is an automated email from the ASF dual-hosted git repository.
clr pushed a commit to branch origin/2.0.1
in repository https://gitbox.apache.org/repos/asf/db-jdo.git
commit f280a5710888d08416ef5fe291927995cf99e3d0
Author: Craig L Russell <cl...@apache.org>
AuthorDate: Mon Oct 9 22:42:57 2006 +0000
JDO-419 JDO-424 Changed state transition table to use UNSPECIFIED where the specification is unclear
---
.../org/apache/jdo/tck/lifecycle/StateTransitions.java | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/tck20/src/java/org/apache/jdo/tck/lifecycle/StateTransitions.java b/tck20/src/java/org/apache/jdo/tck/lifecycle/StateTransitions.java
index 16d7866..a49f0b5 100644
--- a/tck20/src/java/org/apache/jdo/tck/lifecycle/StateTransitions.java
+++ b/tck20/src/java/org/apache/jdo/tck/lifecycle/StateTransitions.java
@@ -127,6 +127,7 @@ public class StateTransitions extends JDO_Test {
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 @@ public class StateTransitions extends JDO_Test {
// 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 @@ public class StateTransitions extends JDO_Test {
// 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 @@ public class StateTransitions extends JDO_Test {
// 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 @@ public class StateTransitions extends JDO_Test {
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();