Uploaded image for project: 'Commons Collections'
  1. Commons Collections
  2. COLLECTIONS-559

Objects which are not of type V can be placed in a MultiValueMap<K,V>.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Invalid
    • 4.0
    • None
    • KeyValue
    • None
    • 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

    Description

      I declared a MultiValueMap as this:

      MultiValueMap<Integer, Path> duplicates = new MultiValueMap<Integer, Path>();
      

      Elsewhere in code I doing (by accident) something in this direction

      duplicates.put(number, new LinkedList<Path>());
      

      Exceptions were being thrown when values returned from the list could not be assigned to variables of type Path.

      org.apache.commons.collections4.map.MultiValueMap.java
      public Object put(final K key, final Object value) {
      ...
      

      I propose that Object in the above decleration is changed to T.

      Attachments

        Activity

          People

            Unassigned Unassigned
            peturingi Pétur Ingi Egilsson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 10m
                10m
                Remaining:
                Remaining Estimate - 10m
                10m
                Logged:
                Time Spent - Not Specified
                Not Specified