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

mark/reset methods of LineNumberInputStream may fail

XMLWordPrintable

    • sparc
    • solaris_1

      If a LineNumberInputStream has just read a \\r character not followed by
      a \\n character, and the mark method is then called, a subsequent reset
      operation will fail to reset the stream to the correct state. The character
      that followed the \\r character will not be re-read.

      Also, if a LineNumberInputStream has just read a \\r character not followed by
      a \\n character, and the reset method is then called, that reset
      operation will fail to reset the stream to the correct state. The character
      that followed the \\r character will be read before the characters to be re-read
      are returned,

      In both cases, the problem is caused by the fact that the pushback variable is not -1.

            dviswanasunw Deepa Viswanathan (Inactive)
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: