-
Bug
-
Resolution: Duplicate
-
P5
-
None
-
1.0
-
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.
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.
- duplicates
-
JDK-4017159 java.io.LineNumberInputStream.mark/reset methods work wrong
- Closed