Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Invalid
-
4.0
-
None
-
None
Description
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!