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:20 UTC
[db-jdo] 38/43: JDO-427 JDO-429 JDO-431
StateTransitionsReturnedObjects.java is modified to make several state
transitions UNSPECIFIED,
since the specification is ambiguous. These changes apply only to the
branches/2.0.1,
as we intend to clarify the specification for JDO 2.1 maintenance release.
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 73d09980e2928ef4c61662e64ead8d0de43857f6
Author: Craig L Russell <cl...@apache.org>
AuthorDate: Tue Oct 10 19:43:35 2006 +0000
JDO-427 JDO-429 JDO-431
StateTransitionsReturnedObjects.java is modified to make several state transitions
UNSPECIFIED, since the specification is ambiguous.
These changes apply only to the branches/2.0.1, as we intend to clarify the
specification for JDO 2.1 maintenance release.
---
.../tck/lifecycle/StateTransitionsReturnedObjects.java | 17 ++++++++---------
1 file changed, 8 insertions(+), 9 deletions(-)
diff --git a/tck20/src/java/org/apache/jdo/tck/lifecycle/StateTransitionsReturnedObjects.java b/tck20/src/java/org/apache/jdo/tck/lifecycle/StateTransitionsReturnedObjects.java
index 6e233d1..5628eab 100644
--- a/tck20/src/java/org/apache/jdo/tck/lifecycle/StateTransitionsReturnedObjects.java
+++ b/tck20/src/java/org/apache/jdo/tck/lifecycle/StateTransitionsReturnedObjects.java
@@ -89,6 +89,7 @@ public class StateTransitionsReturnedObjects 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
@@ -109,7 +110,7 @@ public class StateTransitionsReturnedObjects extends JDO_Test {
// detachCopy outside tx
{ ERROR, IMPOSSIBLE, IMPOSSIBLE,
- IMPOSSIBLE, DETACHED_CLEAN, IMPOSSIBLE,
+ IMPOSSIBLE, UNSPECIFIED, IMPOSSIBLE,
IMPOSSIBLE, IMPOSSIBLE, IMPOSSIBLE,
DETACHED_CLEAN, ERROR, UNCHANGED,
DETACHED_CLEAN},
@@ -118,8 +119,8 @@ public class StateTransitionsReturnedObjects extends JDO_Test {
{ DETACHED_CLEAN, DETACHED_CLEAN, DETACHED_CLEAN,
DETACHED_CLEAN, DETACHED_CLEAN, DETACHED_CLEAN,
DETACHED_CLEAN, ERROR, ERROR,
- DETACHED_CLEAN, ERROR, UNCHANGED,
- DETACHED_CLEAN},
+ DETACHED_CLEAN, ERROR, UNSPECIFIED,
+ UNSPECIFIED},
// serialize outside tx
{ UNCHANGED, IMPOSSIBLE, IMPOSSIBLE,
@@ -131,8 +132,8 @@ public class StateTransitionsReturnedObjects extends JDO_Test {
// serialize with active tx
{ UNCHANGED, DETACHED_CLEAN, DETACHED_CLEAN,
DETACHED_CLEAN, DETACHED_CLEAN, TRANSIENT,
- TRANSIENT, TRANSIENT, TRANSIENT,
- DETACHED_CLEAN, TRANSIENT, UNCHANGED,
+ TRANSIENT, UNSPECIFIED, UNSPECIFIED,
+ DETACHED_CLEAN, UNSPECIFIED, UNCHANGED,
UNCHANGED},
};
@@ -147,10 +148,7 @@ public class StateTransitionsReturnedObjects extends JDO_Test {
private static final boolean[][] applies_to_scenario = {
// Datastore Optimistic No tx
{ true, true, false }, // makePersistent
- // since the spec leaves detachCopy outside tx a bit underspecified,
- // we decided to disable this scanario for now
- //{ false, false, true }, // detachCopy outside tx
- { false, false, false }, // detachCopy outside tx
+ { false, false, true }, // detachCopy outside tx
{ true, true, false }, // detachCopy with active tx
{ false, false, true }, // serialize outside tx
{ true, true, false } // serialize with active tx
@@ -258,6 +256,7 @@ public class StateTransitionsReturnedObjects extends JDO_Test {
expected_state = statesOfReturnedObjects[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();