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

java.io.StreamTokenizer mis-handles quote characters

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 1.3.0
    • 1.2.0
    • core-libs
    • None
    • kestrel
    • sparc
    • solaris_9

      Return value from nextToken() is the quote character instead of TT_WORD
      when a quoted-string is encounted in the stream.

      Result from toString() is then '"' when the quote character is ".

      Code should be changed as follows:

      At the end of the if-statement

         if ((ctype & CT_QUOTE) != 0) {

      the return statement should be

              return ttype = TT_WORD; // was "return ttype;"

            nsanjeevsunw Naveen Sanjeeva (Inactive)
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: