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

Javadoc: incorrect behavior explained for ListUtils.transformedList

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 4.0-alpha1, 4.0
    • List
    • None

    Description

      The contract stated for ListUtils.transformedList is wrong. The list is not transformed – it decorates the existing list and transforms NEW objects – EXISTING objects are not transformed.

      Compare this to the javadoc found in MapUtils.transformedMap:
      "This method returns a new map (decorating the specified map) that will transform any new entries added to it. Existing entries in the specified map will not be transformed. "

      That little missing piece of information messed me up. Just replace "map" with "list" and append it to the existing LilstUtils javadoc.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              pbenedict Paul Benedict
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: