JDO
  1. JDO
  2. JDO-413

NoAccessToFieldsAfterPredelete incorrectly mandates that field access to deleted instances will cause an error

    Details

      Description

      org.apache.jdo.tck.api.instancecallbacks.NoAccessToFieldsAfterPredelete has 7 checks that assert that field access to fields in deleted instances will throw a JDOUserException, but section 5.5.7 only suggests that it might throw a JDOUserException: "Any other access to persistent fields is not supported and might throw a JDOUserException." The checks should not be there. The attached patch removes them.

        Activity

        Hide
        Craig L Russell added a comment -

        This issue is correct. The checks are not consistent with the JDO 2.0 specification. The patch is correct.

        We should revisit this issue for JDO 2.1 to see if it makes sense for the checks to be added if the implementation is BinaryCompatible, or if another PersistenceManagerFactory flag would be suitable.

        If there are no other comments, I'll check in the patch.

        Show
        Craig L Russell added a comment - This issue is correct. The checks are not consistent with the JDO 2.0 specification. The patch is correct. We should revisit this issue for JDO 2.1 to see if it makes sense for the checks to be added if the implementation is BinaryCompatible, or if another PersistenceManagerFactory flag would be suitable. If there are no other comments, I'll check in the patch.
        Hide
        Craig L Russell added a comment -

        svn commit -m "JDO-413 updated test to allow either exception or not for field access after preDelete" src/java/org/apache/jdo/tck/api/instancecallbacks/NoAccessToFieldsAfterPredelete.java
        Sending src/java/org/apache/jdo/tck/api/instancecallbacks/NoAccessToFieldsAfterPredelete.java
        Transmitting file data .
        Committed revision 452640.

        Show
        Craig L Russell added a comment - svn commit -m " JDO-413 updated test to allow either exception or not for field access after preDelete" src/java/org/apache/jdo/tck/api/instancecallbacks/NoAccessToFieldsAfterPredelete.java Sending src/java/org/apache/jdo/tck/api/instancecallbacks/NoAccessToFieldsAfterPredelete.java Transmitting file data . Committed revision 452640.
        Hide
        Craig L Russell added a comment -

        svn commit -m "JDO-413 updated test to allow either exception or not for field access after preDelete" ../../branches/2.0.1/tck20/src/java/org/apache/jdo/tck/api/instancecallbacks
        Sending branches/2.0.1/tck20/src/java/org/apache/jdo/tck/api/instancecallbacks/NoAccessToFieldsAfterPredelete.java
        Transmitting file data .
        Committed revision 452641.

        The patch has been committed to the trunk and branch 2.0.1

        Show
        Craig L Russell added a comment - svn commit -m " JDO-413 updated test to allow either exception or not for field access after preDelete" ../../branches/2.0.1/tck20/src/java/org/apache/jdo/tck/api/instancecallbacks Sending branches/2.0.1/tck20/src/java/org/apache/jdo/tck/api/instancecallbacks/NoAccessToFieldsAfterPredelete.java Transmitting file data . Committed revision 452641. The patch has been committed to the trunk and branch 2.0.1

          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