Uploaded image for project: 'Commons BCEL'
  1. Commons BCEL
  2. BCEL-238

Getters/setters for array should use clone

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • 6.10.1
    • None
    • None

    Description

      Further to BCEL-237, if a getter returns a reference to a private final array, then the array contents can be corrupted.

      Similarly if a setter stores an array reference without cloning it, then any holders of the original reference can subsequently change the array entries.

      Attachments

        Activity

          People

            Unassigned Unassigned
            sebb Sebb
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: