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

8259867: Move encoding checks into ZipCoder #2110

Closed
wants to merge 1 commit into from

Conversation

@eirbjo
Copy link
Contributor

@eirbjo eirbjo commented Jan 16, 2021

ZipFile.Source.initCEN verifies that entry names are encoding into bytes valid in the entry's encoding. It does so by calling encoding-specific checking methods, so it also needs to determine which check method to call for each entry.

By moving the encoding-variant checks into ZipCoder, initCEN can instead simply call ZipCoder.checkEncoding. This makes the code easier to follow and also removes a duplication of flag checking logic found in zipCoderForPos.


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

Reviewers

Download

$ git fetch https://git.openjdk.java.net/jdk pull/2110/head:pull/2110
$ git checkout pull/2110

@bridgekeeper bridgekeeper bot added the oca label Jan 16, 2021
@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Jan 16, 2021

Hi @eirbjo, welcome to this OpenJDK project and thanks for contributing!

We do not recognize you as Contributor and need to ensure you have signed the Oracle Contributor Agreement (OCA). If you have not signed the OCA, please follow the instructions. Please fill in your GitHub username in the "Username" field of the application. Once you have signed the OCA, please let us know by writing /signed in a comment in this pull request.

If you already are an OpenJDK Author, Committer or Reviewer, please click here to open a new issue so that we can record that fact. Please use "Add GitHub user eirbjo" as summary for the issue.

If you are contributing this work on behalf of your employer and your employer has signed the OCA, please let us know by writing /covered in a comment in this pull request.

@eirbjo
Copy link
Contributor Author

@eirbjo eirbjo commented Jan 16, 2021

/issue 8259867

@openjdk
Copy link

@openjdk openjdk bot commented Jan 16, 2021

@eirbjo 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 the core-libs label Jan 16, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Jan 16, 2021

@eirbjo This issue is referenced in the PR title - it will now be updated.

@eirbjo
Copy link
Contributor Author

@eirbjo eirbjo commented Jan 16, 2021

/signed

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Jan 16, 2021

Thank you! Please allow for up to two weeks to process your OCA, although it is usually done within one to two business days. Also, please note that pull requests that are pending an OCA check will not usually be evaluated, so your patience is appreciated!

@mlbridge
Copy link

@mlbridge mlbridge bot commented Jan 19, 2021

Webrevs

@cl4es
cl4es approved these changes Jan 19, 2021
Copy link
Member

@cl4es cl4es left a comment

Welcome back!

Patch looks good to me. I'll sponsor it after allowing some time for other reviewers to have a look.

@openjdk
Copy link

@openjdk openjdk bot commented Jan 19, 2021

@eirbjo 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:

8259867: Move encoding checks into ZipCoder

Reviewed-by: redestad, lancea

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 37 new commits pushed to the master branch:

  • 7c32ffe: 8258383: vmTestbase/gc/g1/unloading/tests/unloading_compilation_level[1,2,3] time out without TieredCompilation
  • 9f21bb6: 8259983: do not use uninitialized expand_ms value in G1CollectedHeap::expand_heap_after_young_collection
  • cf25383: Merge
  • f7b96d3: 8259796: timed CompletableFuture.get may swallow InterruptedException
  • a37cd5a: 8259859: Missing metaspace NMT memory tag
  • 33dcc00: 8132984: incorrect type for Reference.discovered
  • 3edf393: 8259978: PPC64 builds broken after JDK-8258004
  • 5d8861b: 8259995: Missing comma to separate years in copyright header
  • 5cfb36e: 8259036: Failed JfrVersionSystem invariant when VM built with -fno-elide-constructors
  • c0e9c44: 8259962: Shenandoah: task queue statistics is inconsistent after JDK-8255019
  • ... and 27 more: https://git.openjdk.java.net/jdk/compare/afd3f78aec8a67bbfba291d0b94c2779490b945f...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.

As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@cl4es, @LanceAndersen) but any other Committer may sponsor as well.

➡️ To flag this PR as ready for integration with the above commit message, type /integrate in a new comment. (Afterwards, your sponsor types /sponsor in a new comment to perform the integration).

@openjdk openjdk bot added the ready label Jan 19, 2021
Copy link
Contributor

@LanceAndersen LanceAndersen left a comment

The change looks good to me as well

@eirbjo
Copy link
Contributor Author

@eirbjo eirbjo commented Jan 20, 2021

/integrate

@openjdk openjdk bot added the sponsor label Jan 20, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Jan 20, 2021

@eirbjo
Your change (at version be26f48) is now ready to be sponsored by a Committer.

@cl4es
Copy link
Member

@cl4es cl4es commented Jan 20, 2021

/sponsor

@openjdk
Copy link

@openjdk openjdk bot commented Jan 20, 2021

@cl4es @eirbjo Since your change was applied there have been 37 commits pushed to the master branch:

  • 7c32ffe: 8258383: vmTestbase/gc/g1/unloading/tests/unloading_compilation_level[1,2,3] time out without TieredCompilation
  • 9f21bb6: 8259983: do not use uninitialized expand_ms value in G1CollectedHeap::expand_heap_after_young_collection
  • cf25383: Merge
  • f7b96d3: 8259796: timed CompletableFuture.get may swallow InterruptedException
  • a37cd5a: 8259859: Missing metaspace NMT memory tag
  • 33dcc00: 8132984: incorrect type for Reference.discovered
  • 3edf393: 8259978: PPC64 builds broken after JDK-8258004
  • 5d8861b: 8259995: Missing comma to separate years in copyright header
  • 5cfb36e: 8259036: Failed JfrVersionSystem invariant when VM built with -fno-elide-constructors
  • c0e9c44: 8259962: Shenandoah: task queue statistics is inconsistent after JDK-8255019
  • ... and 27 more: https://git.openjdk.java.net/jdk/compare/afd3f78aec8a67bbfba291d0b94c2779490b945f...master

Your commit was automatically rebased without conflicts.

Pushed as commit 0529480.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
3 participants