ArrayInputStream.skipBytes() may throw EOFException which is disallowed by
java.io.DataInput
--------------------------------------------------------------------------------------------
Key: DERBY-3003
URL: https://issues.apache.org/jira/browse/DERBY-3003
Project: Derby
Issue Type: Bug
Components: Services
Affects Versions: 10.4.0.0
Reporter: Knut Anders Hatlen
Priority: Minor
The javadoc for java.io.DataInput.skipBytes(int) says
(<URL:http://java.sun.com/javase/6/docs/api/java/io/DataInput.html#skipBytes(int)>):
> This method never throws an EOFException.
The implementation of this method in
org.apache.derby.iapi.services.io.ArrayInputStream says:
if ((position + n) > end) {
throw new EOFException();
}
The method in ArrayInputStream should be changed so that it skips as many bytes
as possible (max n) and returns the actual number of bytes skipped, even when
EOF is reached.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.