Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8206447: InflaterInputStream.skip receives long but it's limited to Integer.MAX_VALUE #19515

Closed
wants to merge 4 commits into from

Conversation

jaikiran
Copy link
Member

@jaikiran jaikiran commented Jun 3, 2024

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.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change requires CSR request JDK-8333400 to be approved

Issues

  • JDK-8206447: InflaterInputStream.skip receives long but it's limited to Integer.MAX_VALUE (Enhancement - P4)
  • JDK-8333400: InflaterInputStream.skip receives long but it's limited to Integer.MAX_VALUE (CSR)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/19515/head:pull/19515
$ git checkout pull/19515

Update a local copy of the PR:
$ git checkout pull/19515
$ git pull https://git.openjdk.org/jdk.git pull/19515/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 19515

View PR using the GUI difftool:
$ git pr show -t 19515

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/19515.diff

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Jun 3, 2024

👋 Welcome back jpai! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented Jun 3, 2024

@jaikiran This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8206447: InflaterInputStream.skip receives long but it's limited to Integer.MAX_VALUE

Reviewed-by: lancea, alanb

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 58 new commits pushed to the master branch:

  • 7acfba2: 8327650: Test java/nio/channels/DatagramChannel/StressNativeSignal.java timed out
  • c5c0867: 8333252: C2: assert(assertion_predicate_has_loop_opaque_node(iff)) failed: must find OpaqueLoop* nodes
  • d85b0ca: 8332457: Examine startup overheads from JDK-8294961
  • 326dbb1: 8312436: CompletableFuture never completes when 'Throwable.toString()' method throws Exception
  • 9a8096f: 8330047: ASAN build error with gcc 13
  • 6882b38: 8333590: UnmodifiableHeaders.toString() returns a value that represents empty headers
  • cbb6747: 8329581: Java launcher no longer prints a stack trace
  • 789f704: 8322732: ForkJoinPool may underutilize cores in async mode
  • 2c1b311: 8331854: ubsan: copy.hpp:218:10: runtime error: addition of unsigned offset to 0x7fc2b4024518 overflowed to 0x7fc2b4024510
  • 765ad0e: 8331947: Preview creates checkbox for JEP-less preview feature
  • ... and 48 more: https://git.openjdk.org/jdk/compare/769b3e48ea97a13756cf096ae235d7434c0cae34...master

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the rfr Pull request is ready for review label Jun 3, 2024
@openjdk
Copy link

openjdk bot commented Jun 3, 2024

@jaikiran The following label will be automatically applied to this pull request:

  • core-libs

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added core-libs core-libs-dev@openjdk.org csr Pull request needs approved CSR before integration labels Jun 3, 2024
@mlbridge
Copy link

mlbridge bot commented Jun 3, 2024

Webrevs

@jaikiran
Copy link
Member Author

jaikiran commented Jun 3, 2024

The CSR is available for review at https://bugs.openjdk.org/browse/JDK-8333400

Copy link
Contributor

@AlanBateman AlanBateman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This went through a few iterations in the CSR issue, looking good now.

Copy link
Contributor

@LanceAndersen LanceAndersen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

latest update looks good. Thank you and Alan for the additional wordsmithing

@openjdk openjdk bot added ready Pull request is ready to be integrated and removed csr Pull request needs approved CSR before integration labels Jun 5, 2024
@jaikiran
Copy link
Member Author

jaikiran commented Jun 5, 2024

Thank you all for the reviews and the inputs to the specification text. The CSR has been approved, so I'll integrate this now.

@jaikiran
Copy link
Member Author

jaikiran commented Jun 5, 2024

/integrate

@openjdk
Copy link

openjdk bot commented Jun 5, 2024

Going to push as commit d7d1afb.
Since your change was applied there have been 58 commits pushed to the master branch:

  • 7acfba2: 8327650: Test java/nio/channels/DatagramChannel/StressNativeSignal.java timed out
  • c5c0867: 8333252: C2: assert(assertion_predicate_has_loop_opaque_node(iff)) failed: must find OpaqueLoop* nodes
  • d85b0ca: 8332457: Examine startup overheads from JDK-8294961
  • 326dbb1: 8312436: CompletableFuture never completes when 'Throwable.toString()' method throws Exception
  • 9a8096f: 8330047: ASAN build error with gcc 13
  • 6882b38: 8333590: UnmodifiableHeaders.toString() returns a value that represents empty headers
  • cbb6747: 8329581: Java launcher no longer prints a stack trace
  • 789f704: 8322732: ForkJoinPool may underutilize cores in async mode
  • 2c1b311: 8331854: ubsan: copy.hpp:218:10: runtime error: addition of unsigned offset to 0x7fc2b4024518 overflowed to 0x7fc2b4024510
  • 765ad0e: 8331947: Preview creates checkbox for JEP-less preview feature
  • ... and 48 more: https://git.openjdk.org/jdk/compare/769b3e48ea97a13756cf096ae235d7434c0cae34...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Jun 5, 2024
@openjdk openjdk bot closed this Jun 5, 2024
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Jun 5, 2024
@openjdk
Copy link

openjdk bot commented Jun 5, 2024

@jaikiran Pushed as commit d7d1afb.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

@jaikiran jaikiran deleted the 8206447 branch June 5, 2024 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core-libs core-libs-dev@openjdk.org integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

3 participants