commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebb (JIRA)" <j...@apache.org>
Subject [jira] Commented: (COLLECTIONS-317) AbstractHashedMap(Map map) constructor calls overridable non-final method
Date Mon, 16 Feb 2009 19:24:02 GMT

    [ https://issues.apache.org/jira/browse/COLLECTIONS-317?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12674040#action_12674040
] 

Sebb commented on COLLECTIONS-317:
----------------------------------

That would be better than nothing, but I would prefer to make it impossible for the user to
accidentally mess things up.

> 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
>
> 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.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message