NotifyingBufferedInputStream notify bug after reading one byte
--------------------------------------------------------------
Key: JBCOMMON-42
URL:
http://jira.jboss.com/jira/browse/JBCOMMON-42
Project: JBoss Common
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: common-core
Reporter: Bart Vanhaute
Assigned To: Dimitris Andreadis
While I was inspecting something totally unrelated, I came across this bug:
The code for reading one byte in org.jboss.util.stream.NotifyingBufferedInputStream
contains:
public int read()
throws IOException
{
int result = super.read();
if (result == -1)
return result;
checkNotification(result);
return result;
}
The checkNotification method checks if chunkSize bytes have already been read. Obviously,
the above method should be calling checkNotification(1), because only one byte is read.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira