On Fri, 25 Jun 2021 01:39:21 GMT, Brian Burkhalter <b...@openjdk.org> wrote:

>> Modify `java.io.ByteArrayInputStream` methods `read(byte[])` and 
>> `read(byte[],int,int)` to return zero per the `InputStream` specification 
>> when the byte array actual or specified length is zero.
>
> Brian Burkhalter has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   6766844: Add bug ID to test

I realize I submitted this issue a long time ago but I think we have to proceed 
with caution as it is changing long standing behavior. Reading with len==0 will 
arise with code that is reading in a loop and the "previous read" completely 
fills the array and reads all remaining bytes. It's possible that there is 
existing code that will break with this change. I've added the "csr" label for 
now. If this changes goes ahead then it will need a release note too.

-------------

PR: https://git.openjdk.java.net/jdk/pull/4591

Reply via email to