RFR: 8282648: Problems due to conflicting specification of Inflater::inflate(..) and InflaterInputStream::read(..) [v5]
Volker Simonis
simonis at openjdk.java.net
Tue Apr 12 14:35:41 UTC 2022
On Mon, 11 Apr 2022 16:05:33 GMT, Alan Bateman <alanb at openjdk.org> wrote:
>> Volker Simonis has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Adapted wording and copyrights based on @jaikiran review
>
> src/java.base/share/classes/java/util/zip/GZIPInputStream.java line 104:
>
>> 102: * are undefined and an implementation is free to change them during the inflate
>> 103: * operation. If the return value is -1 or an exception is thrown the whole
>> 104: * content of {@code buf} is undefined.
>
> "whole content" doesn't seem right, it should be buf[off] to but[off + len - 1] is undefined.
Good catch. Fixed and also updated the corresponding part for `InflaterInputStream::read`.
-------------
PR: https://git.openjdk.java.net/jdk/pull/7986
More information about the core-libs-dev
mailing list