You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Thomas Neidhart (JIRA)" <ji...@apache.org> on 2013/02/28 21:05:18 UTC

[jira] [Resolved] (COLLECTIONS-317) AbstractHashedMap(Map map) constructor calls overridable non-final method

     [ https://issues.apache.org/jira/browse/COLLECTIONS-317?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thomas Neidhart resolved COLLECTIONS-317.
-----------------------------------------

    Resolution: Fixed
    
> AbstractHashedMap(Map map) constructor calls overridable non-final method
> -------------------------------------------------------------------------
>
>                 Key: COLLECTIONS-317
>                 URL: https://issues.apache.org/jira/browse/COLLECTIONS-317
>             Project: Commons Collections
>          Issue Type: Bug
>          Components: Map
>            Reporter: Sebb
>            Priority: Minor
>             Fix For: 4.0
>
>
> The constructor AbstractHashedMap(Map map) calls the public non-final method putAll() from the same class.
> This is likely to cause problems if the method is ever overridden, as the parent may not have been completely initialised when the sub-class method is invoked. 
> Possible solution: extract the code into a common private method. Or make the method final.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira