You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Pétur Ingi Egilsson (JIRA)" <ji...@apache.org> on 2015/04/01 21:41:53 UTC

[jira] [Closed] (COLLECTIONS-559) Objects which are not of type V can be placed in a MultiValueMap.

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

Pétur Ingi Egilsson closed COLLECTIONS-559.
-------------------------------------------
    Resolution: Invalid

> Objects which are not of type V can be placed in a MultiValueMap<K,V>.
> ----------------------------------------------------------------------
>
>                 Key: COLLECTIONS-559
>                 URL: https://issues.apache.org/jira/browse/COLLECTIONS-559
>             Project: Commons Collections
>          Issue Type: Bug
>          Components: KeyValue
>    Affects Versions: 4.0
>         Environment: java version "1.8.0_25"
> Java(TM) SE Runtime Environment (build 1.8.0_25-b17)
> Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)
> OS X 10.10
>            Reporter: Pétur Ingi Egilsson
>   Original Estimate: 10m
>  Remaining Estimate: 10m
>
> I declared a MultiValueMap as this:
> {code}
> MultiValueMap<Integer, Path> duplicates = new MultiValueMap<Integer, Path>();
> {code}
> Elsewhere in code I doing (by accident) something in this direction
> {code}
> duplicates.put(number, new LinkedList<Path>());
> {code}
> Exceptions were being thrown when values returned from the list could not be assigned to variables of type Path.
> {code:title=org.apache.commons.collections4.map.MultiValueMap.java}
> public Object put(final K key, final Object value) {
> ...
> {code}
> I propose that Object in the above decleration is changed to T.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)