[hibernate-issues] [Hibernate-JIRA] Created: (HHH-5739) PersistentSet#remove() doesn't fullfil the contracts of java.util.Set
Guenther Demetz (JIRA)
noreply at atlassian.com
Wed Nov 17 06:34:13 EST 2010
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