[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-2584) PersistentMap.remove() incorrect on uninitialized, non-extra-lazy map

Mattias Jiderhamn (JIRA) noreply at atlassian.com
Wed Apr 28 07:24:29 EDT 2010


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

Mattias Jiderhamn commented on HHH-2584:
----------------------------------------

Seems the "inverse" bug is fixed in 3.5.1!

> PersistentMap.remove() incorrect on uninitialized, non-extra-lazy map
> ---------------------------------------------------------------------
>
>                 Key: HHH-2584
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2584
>             Project: Hibernate Core
>          Issue Type: Patch
>          Components: core
>    Affects Versions: 3.2.1, 3.2.2, 3.2.3
>         Environment: Hibernate 3.2.3 ga, MySQL 5.0.24a, for Win32
>            Reporter: Daniel Wellman
>            Assignee: Steve Ebersole
>             Fix For: 3.3.x, 3.5.0-Beta-3
>
>         Attachments: persistentmap_remove.patch
>
>          Time Spent: 53m
>  Remaining Estimate: 0h
>
> This problem is nearly identical to HHH-2476:  PersistentMap.put() incorrect on uninitialized, non-extra-lazy map.  remove() has the same problem.  See also issue HHH-2142.
> The write up for HHH-2476 was so concise that I will transform it here, substituting remove() for put().
> ---
> Essentially, an uninitialized PersistentMap loses the first remove() into it if defined as non-extra-lazy.
> The underlying cause is the code in PersistentMap#remove() which attempts to readElementByIndex(). In the case of non-extra-lazy, readElementByIndex() returns the UNKNOWN marker object which is supposed to be used to signal that the delegate map is now initialized and to remove the element directly from the map. Long story short, PersistentMap#remove() does not properly check the return value from readElementByIndex() and react accordingly.

-- 
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