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

java.io.StreamTokenizer.lineno inaccurate

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: P4 P4
    • None
    • 1.1.1
    • core-libs
    • sparc
    • solaris_2.5.1

      The code for nextToken() only increments LINENO if EOL is classified as a
      whitespace character. However, if eolIsSignificant() then arguably
      EOL is *not* whitespace, even though the code is treating it that way.
      The test for EOL is significant comes after the check for whitespace.
      If the syntax table has been reset, then it's possible that a client
      may not classify EOL as whitespace, because it is considered significant.
      So either the documentation should reflect the need for EOL to be whitespace
      even if significant, or the code ought to be changed to fix the bug.

            zlisunw Zhenghua Li (Inactive)
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: