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

Javadoc: incorrect behavior explained for ListUtils.transformedList

Agile BoardAttach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.0-alpha1, 4.0
    • Component/s: List
    • Labels:
      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

            • Assignee:
              Unassigned
              Reporter:
              pbenedict Paul Benedict

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment