Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6299180

ImmutableDescriptor immutability can be compromised for array-valued fields

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 6
    • 6
    • core-svc
    • None
    • b47
    • generic
    • generic

      If a field in an ImmutableDescriptor is an array, then it can modified as follows:

      ImmutableDescriptor d = ...;
      String[] field = (String[]) d.getFieldValue("strings");
      field[0] = "something else";

      Plainly array-valued fields should be cloned in getFieldValue.
      ###@###.### 2005-07-20 08:31:31 GMT

            emcmanus Eamonn McManus
            emcmanus Eamonn McManus
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: