JDK-6766844 : ByteArrayInputStream#read with a byte array of length 0 not consistent with InputStream when at EOF
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.io
  • Affected Version: 7
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • OS: generic,windows_7
  • CPU: generic,x86
  • Submitted: 2008-11-03
  • Updated: 2018-09-11
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
tbdUnresolved
Related Reports
Duplicate :  
Relates :  
Relates :  
Description
When InputStream#read is invoked with a byte[] of length 0 then 0 is returned without attempting to read any bytes. ByteArrayInputStream breaks this contract for the case that all bytes have been read. In that case it returns -1 instead of 0.