ImmutableDescriptor immutability can be compromised for array-valued fields

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • 6
    • Affects Version/s: 6
    • Component/s: 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

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: