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

8273826: Correct Manifest file name and NPE checks #5841

Closed
wants to merge 2 commits into from

Conversation

coffeys
Copy link
Contributor

@coffeys coffeys commented Oct 6, 2021

Use correct manifest file name in the Manifest verifier checks.
Also - extra null check

The test doesn't reproduce the exact issue reported but should prevent future regressions in this area.


Progress

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

Issue

  • JDK-8273826: Correct Manifest file name and NPE checks

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/5841/head:pull/5841
$ git checkout pull/5841

Update a local copy of the PR:
$ git checkout pull/5841
$ git pull https://git.openjdk.java.net/jdk pull/5841/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 5841

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/5841.diff

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Oct 6, 2021

👋 Welcome back coffeys! 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 openjdk bot added the rfr label Oct 6, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Oct 6, 2021

@coffeys The following labels will be automatically applied to this pull request:

  • core-libs
  • security

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

@openjdk openjdk bot added security core-libs labels Oct 6, 2021
@mlbridge
Copy link

@mlbridge mlbridge bot commented Oct 6, 2021

Webrevs

@coffeys
Copy link
Contributor Author

@coffeys coffeys commented Oct 6, 2021

/label remove core-libs

@openjdk openjdk bot removed the core-libs label Oct 6, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Oct 6, 2021

@coffeys
The core-libs label was successfully removed.

@@ -63,6 +63,7 @@
ArrayList<byte[]> manifestHashes;

private String name = null;
private String manifestFileName;
Copy link
Contributor

@wangweij wangweij Oct 6, 2021

Choose a reason for hiding this comment

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

Make this final and add a comment that it will never be null.

Copy link
Contributor Author

@coffeys coffeys Oct 7, 2021

Choose a reason for hiding this comment

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

Thanks for the review - Made final and added comment. Also decided to make the "Manifest man" variable final here also while here.

Copy link
Contributor

@wangweij wangweij Oct 7, 2021

Choose a reason for hiding this comment

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

Great, the more final there are, the less I need to look back and forth while reading the code.

@openjdk
Copy link

@openjdk openjdk bot commented Oct 6, 2021

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

8273826: Correct Manifest file name and NPE checks

Reviewed-by: weijun, hchao, mullan

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

  • 722d639: 8274838: runtime/cds/appcds/TestSerialGCWithCDS.java fails on Windows
  • 340c715: 8273929: Remove GzipRandomAccess in heap dump test
  • 8319836: 8274546: Shenandoah: Remove unused ShenandoahUpdateRootsTask copy
  • d5ccfa2: 8274755: Replace 'while' cycles with iterator with enhanced-for in jdk.jdi
  • 29dcbb7: 8274716: JDWP Spec: the description for the Dispose command confuses suspend with resume.
  • 5762ec2: 8274780: ChannelInputStream.readNBytes(int) incorrectly calls readAllBytes()
  • 4e960fe: 8274497: Unnecessary Vector usage in AquaFileSystemModel
  • c833b4d: 8274329: Fix non-portable HotSpot code in MethodMatcher::parse_method_pattern
  • d57fb6f: 8274456: Remove jtreg tag manual=yesno java/awt/print/PrinterJob/PageDialogTest.java
  • 734d1fb: 8274211: Test man page that options are documented
  • ... and 91 more: https://git.openjdk.java.net/jdk/compare/c4d115701d102c33af937ca25dda8ac50117ac6b...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 ready label Oct 6, 2021
Copy link
Contributor

@haimaychao haimaychao left a comment

Looks good.

* @summary Test for signed jar file with lowercase META-INF files
* @library /test/lib ../
* @build jdk.test.lib.util.JarUtils
* @run main LowerCaseManifest
Copy link
Member

@seanjmullan seanjmullan Oct 7, 2021

Choose a reason for hiding this comment

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

You don't need this line as this is the default @run setting.

Copy link
Contributor Author

@coffeys coffeys Oct 7, 2021

Choose a reason for hiding this comment

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

Looks like it's required if there's a @build directive

Copy link
Member

@seanjmullan seanjmullan Oct 7, 2021

Choose a reason for hiding this comment

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

Ok.

Copy link
Contributor

@wangweij wangweij Oct 7, 2021

Choose a reason for hiding this comment

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

It might be necessary because there is already a @build there.

@coffeys
Copy link
Contributor Author

@coffeys coffeys commented Oct 7, 2021

/integrate

@openjdk
Copy link

@openjdk openjdk bot commented Oct 7, 2021

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

  • 722d639: 8274838: runtime/cds/appcds/TestSerialGCWithCDS.java fails on Windows
  • 340c715: 8273929: Remove GzipRandomAccess in heap dump test
  • 8319836: 8274546: Shenandoah: Remove unused ShenandoahUpdateRootsTask copy
  • d5ccfa2: 8274755: Replace 'while' cycles with iterator with enhanced-for in jdk.jdi
  • 29dcbb7: 8274716: JDWP Spec: the description for the Dispose command confuses suspend with resume.
  • 5762ec2: 8274780: ChannelInputStream.readNBytes(int) incorrectly calls readAllBytes()
  • 4e960fe: 8274497: Unnecessary Vector usage in AquaFileSystemModel
  • c833b4d: 8274329: Fix non-portable HotSpot code in MethodMatcher::parse_method_pattern
  • d57fb6f: 8274456: Remove jtreg tag manual=yesno java/awt/print/PrinterJob/PageDialogTest.java
  • 734d1fb: 8274211: Test man page that options are documented
  • ... and 91 more: https://git.openjdk.java.net/jdk/compare/c4d115701d102c33af937ca25dda8ac50117ac6b...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot closed this Oct 7, 2021
@openjdk openjdk bot added integrated and removed ready rfr labels Oct 7, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Oct 7, 2021

@coffeys Pushed as commit 03a8d34.

💡 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
Labels
integrated security
4 participants