RFR: 8206447: InflaterInputStream.skip receives long but it's limited to Integer.MAX_VALUE [v4]
Lance Andersen
lancea at openjdk.org
Wed Jun 5 15:40:02 UTC 2024
On Wed, 5 Jun 2024 12:14:07 GMT, Jaikiran Pai <jpai at openjdk.org> wrote:
>> Can I please get a review of this change which updates the API specification of `java.util.zip.InflaterInputStream.skip()` method to match its current implementation?
>>
>> `InflaterInputStream.skip()`, just like `DeflaterInputStream.skip()`, takes a `long` value `n` representing the number of bytes to skip. When a value greater than `Integer.MAX_VALUE` is passed to this `InflaterInputStream.skip()` method, the current implementation in that method only skips at most `Integer.MAX_VALUE` bytes. `DeflaterInputStream.skip()` too has the same behaviour. However, in the case of `DeflaterInputStream.skip()`, this semantic is clearly noted in that method's API documentation. `InflaterInputStream.skip()` currently doesn't specify this behaviour.
>>
>> The commit in this PR updates the `InflaterInputStream.skip()` to specify the current implementation.
>>
>> I'll open a CSR for this change.
>
> Jaikiran Pai has updated the pull request incrementally with one additional commit since the last revision:
>
> clarify blocking semantic
latest update looks good. Thank you and Alan for the additional wordsmithing
-------------
Marked as reviewed by lancea (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/19515#pullrequestreview-2099574770
More information about the core-libs-dev
mailing list