You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Peter Cooper Jr. (JIRA)" <ji...@apache.org> on 2013/12/03 21:33:36 UTC

[jira] [Created] (COLLECTIONS-504) CompositeMap should support compositing of maps of derived types

Peter Cooper Jr. created COLLECTIONS-504:
--------------------------------------------

             Summary: CompositeMap should support compositing of maps of derived types
                 Key: COLLECTIONS-504
                 URL: https://issues.apache.org/jira/browse/COLLECTIONS-504
             Project: Commons Collections
          Issue Type: Bug
          Components: Map
    Affects Versions: 4.0
            Reporter: Peter Cooper Jr.
            Priority: Minor


I'm attempting to composite two maps, one of which is a {{Map<String, String>}} and the other of which is a {{Map<String, Object>}}. I would have expected that I could composite them into a {{CompositeMap<String, Object>}}, but the constructors of CompositeMap expect all of the maps being composited to have exactly the same type arguments.

That is, I think the constructors should take arguments of {{Map<? extends K, ? extends V>}} instead of what they currently have of {{Map<K, V>}}, much like most collection methods, since there shouldn't be a problem accepting type arguments that are subtypes of the composite map types.

Thanks!



--
This message was sent by Atlassian JIRA
(v6.1#6144)