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

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

    Details

    • Type: Enhancement
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: 1.4.2
    • Fix Version/s: None
    • Component/s: core-libs
    • Labels:
    • Subcomponent:
    • CPU:
      x86
    • OS:
      linux

      Description

      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)
      ======================================================================

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Imported:
                Indexed: