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

8302293: jar --create fails with IllegalArgumentException if archive name is shorter than 3 characters #22841

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

jaikiran
Copy link
Member

@jaikiran jaikiran commented Dec 20, 2024

Can I please get a review for this change which proposes to fix the issue noted in https://bugs.openjdk.org/browse/JDK-8302293?

As noted in the issue, when creating a temporary file during the "jar --create" operation, if the original file name is lesser than 3 characters, the temporary file creation which uses the original file's name as the temporary file name prefix, runs into an exception. The commit in this PR addresses that issue by ensuring that the temporary file name prefix is atleast 3 characters in length. Within the same file, an additional place was spotted where the code could potentially run into the same exception, so that too has been addressed in this change.

A new jtreg test has been introduced which reproduces the issue and verifies the fix.


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

Warning

 ⚠️ Found leading lowercase letter in issue title for 8302293: jar --create fails with IllegalArgumentException if archive name is shorter than 3 characters

Issue

  • JDK-8302293: jar --create fails with IllegalArgumentException if archive name is shorter than 3 characters (Bug - P4)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 22841

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

Using diff file

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

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Dec 20, 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.

@jaikiran jaikiran changed the title 8302293: jar --create fails with IllegalAccessException if archive name is shorter than 3 characters 8302293: jar --create fails with IllegalArgumentException if archive name is shorter than 3 characters Dec 20, 2024
@openjdk
Copy link

openjdk bot commented Dec 20, 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:

8302293: jar --create fails with IllegalArgumentException if archive name is shorter than 3 characters

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

  • bcb1bda: 8345259: Disallow ALL-MODULE-PATH without explicit --module-path
  • 054c644: 8346667: Doccheck: warning about missing before

  • 2a68f74: 8346128: Comparison build fails due to difference in LabelTarget.html
  • cf28fd4: 8322983: Virtual Threads: exclude 2 tests
  • 85e024d: 8346605: AIX fastdebug build fails in memoryReserver.cpp after JDK-8345655
  • 54f3475: 8331467: FileSystems.getDefault fails with ClassNotFoundException if custom default provider is in run-time image
  • 35fafbc: 8346106: Verify.checkEQ: testing utility for recursive value verification

Please see this link for an up-to-date comparison between the source branch of this pull request and the master branch.
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 Dec 20, 2024
@openjdk
Copy link

openjdk bot commented Dec 20, 2024

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

  • compiler
  • core-libs

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.

@jaikiran
Copy link
Member Author

/label remove compiler

@mlbridge
Copy link

mlbridge bot commented Dec 20, 2024

Webrevs

@openjdk
Copy link

openjdk bot commented Dec 20, 2024

@jaikiran
The compiler label was successfully removed.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core-libs [email protected] ready Pull request is ready to be integrated rfr Pull request is ready for review
Development

Successfully merging this pull request may close these issues.

2 participants