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

findBugs Warnings: several classes in package functors may expose their internal representation

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.2.1
    • Fix Version/s: 4.0-alpha1, 4.0
    • Component/s: None
    • Labels:
      None

      Description

      Several classes (e.g. SwitchTransformer) take in their constructor an array as input which is not copied/cloned.
      Thus its internal representation may be changed externally.

      The corresponding factory methods do copy the input arguments thus we have two choices:

      • move the copy from the factory methods to the ctors
      • make the ctors private to prevent their use

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              tn Thomas Neidhart
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: