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

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.2.1
    • 4.0-alpha1, 4.0
    • None
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: