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

(coll spec) Collection toString method doc maintenance

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 6
    • 6
    • core-libs

      The toString methods in classes implementing Collection or Map could be improved:
      - Many classes are terribly overspecified, requiring that StringBuffer be used in
        the implementation, when StringBuilder is more efficient, and no program could tell
        which was being used (without serious cheating). Replacing StringBuffer with
        StringBuilder is an obvious optimization.
      - The CopyOnWriteArrayList class, on the other hand, is underspecified, not making it
        clear exactly what the textual form of the output is, even though it complies with the
        [a, b, c] format that other Collection classes use.

            martin Martin Buchholz
            martin Martin Buchholz
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: