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

Doc: JCK: spec for AttributedString.addAttribute(*) is incomplete

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 6
    • 5.0
    • core-libs
    • None
    • beta
    • sparc
    • solaris_2.5

      Name: id146280 Date: 09/10/2004


      Specification for methods

      public void addAttribute(AttributedCharacterIterator.Attribute attribute,
                               Object value)

      public void addAttribute(AttributedCharacterIterator.Attribute attribute,
                               Object value,
                               int beginIndex,
                               int endIndex)

      public void addAttributes(Map attributes,
                                int beginIndex,
                                int endIndex)

      is incomplete because it does not describe if methods clone given Attribute(s)
      or just store reference. Class levele specification does not help either.

      Specification should explicitly state that reference to Attribute(s) is stored.

      Please note that specification for AttributedCharacterIterator states:

      "
      ...
      The values for an attribute are immutable, or must not be mutated by clients
      or storage. They are always passed by reference, and not cloned.
      ...
      "

      ======================================================================
      ###@###.### 10/27/04 02:22 GMT

            nlindenbsunw Norbert Lindenberg (Inactive)
            idergali Ilya Dergalin (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: