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

Audit java.io methods for opportunities to use CharSequence instead of String

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • None
    • 1.4.2
    • core-libs
    • x86
    • linux

      Name: rmT116609 Date: 11/10/2003


      A DESCRIPTION OF THE REQUEST :
      Now that the CharSequence interface exists, many I/O methods that take
      parameters of type String either should take type CharSequence instead
      or should be augmented with overloaded methods that take type CharSequence.

      Some specifics are:
      - *.write(String)
      - *.println(String)
      - RandomAccessFile.writeChars(String)
      - *.writeUTF(String)



      JUSTIFICATION :
      If nothing else, this change seems like something that should have been done
      with the introduction of CharSequence in the first place.

      More specifically, it would allow callers that deal with type CharSequence
      to pass data directly, without having to create a String object (or know
      how to find an existing String or character array backing the CharSequence).
      (Incident Review ID: 224689)
      ======================================================================

            Unassigned Unassigned
            rmandalasunw Ranjith Mandala (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Imported:
              Indexed: