commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter Cooper Jr. (JIRA)" <j...@apache.org>
Subject [jira] [Created] (COLLECTIONS-504) CompositeMap should support compositing of maps of derived types
Date Tue, 03 Dec 2013 20:33:36 GMT
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)

Mime
View raw message