On Sun, 20 Mar 2022 13:53:34 GMT, Alan Bateman <al...@openjdk.org> wrote:

>> Jaikiran Pai has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   Use Alan's suggestion and allocate less than 512 bytes if possible. Plus 
>> copyright year fix.
>
> src/java.base/share/classes/java/util/zip/InflaterInputStream.java line 206:
> 
>> 204:         int max = (int)Math.min(n, Integer.MAX_VALUE);
>> 205:         int total = 0;
>> 206:         byte[] b = new byte[512];
> 
> n may be less than 512 so maybe the temporary array can be of length 
> Math.min(max, 512).

That's a good idea. I just pushed a update to this PR with this suggested 
change. Plus updated the copyright year too.

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

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

Reply via email to