JDO
  1. JDO
  2. JDO-424

StateTransitions makes undocumented assertions in detachCopy with active tx

    Details

      Description

      In StateTransitions.java, a couple of the transition assertions that are made in the "detachCopy with active tx" scenario are not documented:

      Element 4 (0-based) asserts that HOLLOW will remain UNCHANGED when detachCopy() is called on them. However, this doesn't seem to be anywhere in the spec, and also doesn't seem right, since a hollow instance would need to instantiate its fields in order to cascade the detach operation (subject to the setting of the DETACH_LOAD_FIELDS setting).

      Element 9 asserts that a PERSISTENT_NONTRANSACTIONAL instance will remain unchanged. However, for the same reason as above, it might transition to persistent-clean due to reading a field.

        Activity

        Hide
        Craig L Russell added a comment -

        I agree that this behavior is not specified, so I propose changing the UNCHANGED in the two cases to UNSPECIFIED.

        Show
        Craig L Russell added a comment - I agree that this behavior is not specified, so I propose changing the UNCHANGED in the two cases to UNSPECIFIED.
        Hide
        Craig L Russell added a comment -

        svn commit -m "JDO-419 JDO-424 Changed state transition table to use UNSPECIFIED where the specification is unclear" trunk/tck20/src/java/org/apache/jdo/tck/lifecycle/StateTransitions.java branches/2.0.1/tck20/src/java/org/apache/jdo/tck/lifecycle/StateTransitions.java
        Sending branches/2.0.1/tck20/src/java/org/apache/jdo/tck/lifecycle/StateTransitions.java
        Sending trunk/tck20/src/java/org/apache/jdo/tck/lifecycle/StateTransitions.java
        Transmitting file data ..
        Committed revision 454538.

        Show
        Craig L Russell added a comment - svn commit -m " JDO-419 JDO-424 Changed state transition table to use UNSPECIFIED where the specification is unclear" trunk/tck20/src/java/org/apache/jdo/tck/lifecycle/StateTransitions.java branches/2.0.1/tck20/src/java/org/apache/jdo/tck/lifecycle/StateTransitions.java Sending branches/2.0.1/tck20/src/java/org/apache/jdo/tck/lifecycle/StateTransitions.java Sending trunk/tck20/src/java/org/apache/jdo/tck/lifecycle/StateTransitions.java Transmitting file data .. Committed revision 454538.

          People

          • Assignee:
            Craig L Russell
            Reporter:
            Marc Prud'hommeaux
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development