-
Bug
-
Resolution: Fixed
-
P4
-
1.0.2
-
1.2beta3
-
sparc
-
solaris_2.5
-
Not verified
This bug was found by St.Petersburg Java SQE team (by Stanislav Avzan).
The Java Language specification (Version 1.0 - August 1, 1996) does not describe case of negative n of java.io.InputStream.skip(n) method.
Specification says (see item 22.3.4):
"22.3.4 public long skip(long n) throws IOException
The general contract of skip is that it makes an attempt to skip over n bytes
of data from the input stream, discarding the skipped bytes. However, it may
skip over some smaller number of bytes, possibly zero. This may result from
any of a number of conditions; reaching end of file before n bytes have
been skipped is only one possibility. The actual number of bytes skipped is
returned."
This statement does not describe behaviour of this method in case of negative n.