[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-5739) PersistentSet#remove() doesn't fullfil the contracts of java.util.Set

Guenther Demetz (JIRA) noreply at atlassian.com
Wed Nov 17 08:14:13 EST 2010


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-5739?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=39134#action_39134 ] 

Guenther Demetz commented on HHH-5739:
--------------------------------------

This bug only happens on LazyCollectionOption.EXTRA collections.
Please close or reject this issue.
I will open a new one with a correct description and a testcase once I have localized the bug.

> PersistentSet#remove() doesn't fullfil the contracts of java.util.Set
> ---------------------------------------------------------------------
>
>                 Key: HHH-5739
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5739
>             Project: Hibernate Core
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 3.6.0
>         Environment: Hiberante3.6.0Final
>            Reporter: Guenther Demetz
>            Priority: Minor
>
> According the specification of java.util.Set#remove(java.lang.Object)
> <quoted: "the set will not contain the specified element once the call returns">
> org.hibernate.collection.PersistentSet#remove() violates this constraint
> as the removal is not done immediately but enqueued as DelayedOperation;
> so the set will still contain the specified element after the call returns:
> org.hibernate.collection.PersistentSet myPersistentSet;
> ...
> myPersistentSet.remove(someObject);
> if (myPersistentSet.contains(someObject))
>    throw new RuntimeException("PersistentSet#remove() don't fullfills the contracts of java.util.Set");

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list