On Thu, 4 Jan 2024 18:37:59 GMT, Markus KARG wrote:
>> No: the third param of
>> [Arrays.copyOfRange](https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/util/Arrays.html#copyOfRange(byte[],int,int))
>> is `to`, not `len`.
>
> Ah, this explains why it did not fail originally, but
On Thu, 4 Jan 2024 18:32:55 GMT, Markus KARG wrote:
>> The final position instead of the number of bytes to write was being passed
>> to `ByteArrayOuputStream.write(byte[],int,int)`.
>
> src/java.base/share/classes/java/io/BufferedInputStream.java line 650:
>
>> 648: } else {
On Thu, 4 Jan 2024 18:35:49 GMT, Brian Burkhalter wrote:
>> src/java.base/share/classes/java/io/BufferedInputStream.java line 650:
>>
>>> 648: } else {
>>> 649: // Prevent poisoning and leaking of buf
>>> 650: byte[] buffer =
On Wed, 3 Jan 2024 18:01:59 GMT, Brian Burkhalter wrote:
> The final position instead of the number of bytes to write was being passed
> to `ByteArrayOuputStream.write(byte[],int,int)`.
src/java.base/share/classes/java/io/BufferedInputStream.java line 650:
> 648: } else {
>
On Wed, 3 Jan 2024 18:01:59 GMT, Brian Burkhalter wrote:
> The final position instead of the number of bytes to write was being passed
> to `ByteArrayOuputStream.write(byte[],int,int)`.
Marked as reviewed by stsypanov (Author).
-
PR Review:
On Wed, 3 Jan 2024 18:01:59 GMT, Brian Burkhalter wrote:
> The final position instead of the number of bytes to write was being passed
> to `ByteArrayOuputStream.write(byte[],int,int)`.
Marked as reviewed by alanb (Reviewer).
-
PR Review:
The final position instead of the number of bytes to write was being passed to
`ByteArrayOuputStream.write(byte[],int,int)`.
-
Commit messages:
- 8322877: java/io/BufferedInputStream/TransferTo.java failed with
IndexOutOfBoundsException
Changes:
On Wed, 3 Jan 2024 18:01:59 GMT, Brian Burkhalter wrote:
> The final position instead of the number of bytes to write was being passed
> to `ByteArrayOuputStream.write(byte[],int,int)`.
Everyone was apparently caught off guard as previously
`Arrays.copyOfRange(byte[],int,int)` had been used