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

JDK-8257514: Fix the issues in jdk.jpackage identified by SpotBugs #1561

Closed
wants to merge 3 commits into from

Conversation

@andyherrick
Copy link

@andyherrick andyherrick commented Dec 2, 2020


Progress

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

Issue

  • JDK-8257514: Fix the issues in jdk.jpackage identified by SpotBugs

Reviewers

Download

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

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Dec 2, 2020

👋 Welcome back herrick! 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 openjdk bot commented Dec 2, 2020

@andyherrick To determine the appropriate audience for reviewing this pull request, one or more labels corresponding to different subsystems will normally be applied automatically. However, no automatic labelling rule matches the changes in this pull request. In order to have an "RFR" email sent to the correct mailing list, you will need to add one or more applicable labels manually using the /label pull request command.

Applicable Labels
  • 2d
  • awt
  • beans
  • build
  • compiler
  • core-libs
  • hotspot
  • hotspot-compiler
  • hotspot-gc
  • hotspot-jfr
  • hotspot-runtime
  • i18n
  • javadoc
  • jdk
  • jmx
  • kulla
  • net
  • nio
  • security
  • serviceability
  • shenandoah
  • sound
  • swing
@andyherrick andyherrick marked this pull request as ready for review Dec 2, 2020
@openjdk openjdk bot added the rfr label Dec 2, 2020
@andyherrick andyherrick closed this Dec 2, 2020
@andyherrick andyherrick reopened this Dec 2, 2020
@andyherrick andyherrick marked this pull request as draft Dec 2, 2020
@openjdk openjdk bot removed the rfr label Dec 2, 2020
@andyherrick andyherrick marked this pull request as ready for review Dec 2, 2020
@openjdk openjdk bot added the rfr label Dec 2, 2020
@andyherrick
Copy link
Author

@andyherrick andyherrick commented Dec 2, 2020

@andyherrick
Copy link
Author

@andyherrick andyherrick commented Dec 2, 2020

Build failure in above macos debug build is unrelated to this change (CompileDemos.gmk:161)

@alexeysemenyukoracle
Copy link
Member

@alexeysemenyukoracle alexeysemenyukoracle commented Dec 2, 2020

Honestly, I don't see much value in the new static members of IOUtils class. But they don't make any trouble either.

Copy link
Contributor

@shipilev shipilev left a comment

If you are seeking a formal (R)eview ack, here it is.

|| appImageDir.toFile().list() == null
|| appImageDir.toFile().list().length == 0) {
Comment on lines +212 to +213

This comment has been minimized.

@shipilev

shipilev Dec 7, 2020
Contributor

Are the calls to list() idempotent enough here? I.e. can it turn NULL on the second call?

This comment has been minimized.

@andyherrick

andyherrick Dec 7, 2020
Author

second call wont be made if first returns null

This comment has been minimized.

@shipilev

shipilev Dec 7, 2020
Contributor

Not what I was asking. Can first call return not NULL, and then second return NULL, failing with NPE? It is customary to use local variable if we are unsure about this.

@openjdk
Copy link

@openjdk openjdk bot commented Dec 7, 2020

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

8257514: Fix the issues in jdk.jpackage identified by SpotBugs

Reviewed-by: asemenyuk, almatvee, shade

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

  • 05dac03: 8257803: Add -Xbatch to compiler/blackhole tests
  • 29a09c8: 8257668: SA JMap - skip non-java thread stack dump for heap dump
  • e590618: 8252505: C1/C2 compiler support for blackholes
  • 972bc3b: 8256167: Convert JDK use of Reference::get to Reference::refersTo
  • 78be334: 8242332: Add SHA3 support to SunPKCS11 provider
  • c4339c3: 8243614: Typo in ReentrantLock's Javadoc
  • d3ac1bf: 8198390: Test MultiResolutionDrawImageWithTransformTest.java fails when -esa is passed
  • 51d325e: 8257633: Missing -mmacosx-version-min=X flag when linking libjvm
  • e27ea4d: 8257750: writeBuffer field of java.io.DataOutputStream should be final
  • dd0b945: 8257531: Super word not applied to a loop of simple Buffer operations
  • ... and 114 more: https://git.openjdk.java.net/jdk/compare/e3abe51a31a4dc544f26c9423c67d6f7b916e8a9...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 Dec 7, 2020
@andyherrick
Copy link
Author

@andyherrick andyherrick commented Dec 7, 2020

/integrate

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

@openjdk openjdk bot commented Dec 7, 2020

@andyherrick Since your change was applied there have been 142 commits pushed to the master branch:

  • bbc44f5: 8257186: Size of heap segments is not computed correctlyFix overflow in size computation for heap segments
  • b4b9828: 8254784: javac should reject records with @SafeVarargs applied to varargs record component
  • dcf63f8: 8257788: Class fields could be local in the SunJSSE provider
  • d29c78d: 8257679: Improved unix compatibility layer in Windows build (winenv)
  • 74be819: 8257517: LogCompilation: Add -z to the help messages
  • 2c04fc0: 8257037: No javac warning when calling deprecated constructor with diamond
  • 46b35ac: 8257798: [PPC64] undefined reference to Klass::vtable_start_offset()
  • ecd7e47: 8257793: Shenandoah: SATB barrier should only filter out already strongly marked oops
  • e08b9ed: 8257820: Remove gc/ergonomics/TestMinHeapSize.java as it is too brittle
  • 637b0c6: 8246778: Compiler implementation for Sealed Classes (Second Preview)
  • ... and 132 more: https://git.openjdk.java.net/jdk/compare/e3abe51a31a4dc544f26c9423c67d6f7b916e8a9...master

Your commit was automatically rebased without conflicts.

Pushed as commit e3793e5.

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

@@ -111,7 +111,7 @@ static void validateName(String s, boolean forApp)
if (forApp) {
return;
} else {
throw new PackagerException(exceptionKey, s);
throw new PackagerException(exceptionKey);

This comment has been minimized.

@azuev-java

azuev-java Dec 7, 2020
Member

Wouldn't it be better to do throw new PackagerException(exceptionKey, "null"); so the message looks more understandable later?

This comment has been minimized.

@andyherrick

andyherrick Dec 7, 2020
Author

isn't that exactly the same ?

@andyherrick andyherrick deleted the andyherrick:JDK-8257514 branch Dec 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
5 participants