-
Notifications
You must be signed in to change notification settings - Fork 6.2k
8352858: Make java.net.JarURLConnection fields final #24218
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
Conversation
|
👋 Welcome back eirbjo! A progress list of the required criteria for merging this PR into |
|
@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: 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 814 new commits pushed to the
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 |
Webrevs
|
jaikiran
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks reasonable to me. Please run tier1 and tier2 to make sure nothing fails unexpectedly.
jaikiran
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the update. Looks fine to me.
|
@jaikiran GHA is green and tier2 completed with a single test failing: This seems unrelated and already fixed in JDK-8352302 I'll let the earth spin just in case other reviewers have opinions, then integrate. |
|
Hi Eirik, looks reasonable - thanks for holding off integrating: I've sent the patch to our CI and will report back when I get the results. |
dfuch
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Proposed changes look reasonable. More final is good!
CI results showed up green.
| * REMIND: we don't handle nested JAR URLs | ||
| */ | ||
| if (separator == -1) { | ||
| // REMIND: we don't handle nested JAR URLs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just noticed that this comment seems misplaced and is confusing.
The check just asserts that the URL contains the separator. I don't see how this is related to nesting at all. If the URL was nested, we would have more than one separator, right?
If we agree this comment is misplaced, perhaps we should just remove it?
Or perhaps the REMIND here is a type of TODO?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this is just a reminder that there should just be one single "!/" because nested "!/" in URL are not supported.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright, however mysterious it seems to carry some value. Let's keep it around.
Thanks for your reviews!
|
/integrate |
|
Going to push as commit 1a8c8e0.
Your commit was automatically rebased without conflicts. |
Please help review this cleanup PR which makes the
java.net.JarURLConnectionfieldsjarFileURLandentryNamefinal.The current
parseSpecmethod is somewhat crufty, with some code quality issues which this PR aims to improve:separatoris confusingly incremented during parsing (using pre AND post increment operators)@SuppressWarningsannotationsjarFileURLandentryNamefields are both assigned more than onceThe PR addresses the above issues by inlining
parseSpecinto the constructor, then extracting static helper methods for parsing the file URL and the entry name. This allows the fields to be made final.Since this is purely a refactoring PR, no tests are updated and the
noreg-cleanuplabel is added in JBS.Reviewing individual commits in this PR may aid verification of separate refactorings.
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/24218/head:pull/24218$ git checkout pull/24218Update a local copy of the PR:
$ git checkout pull/24218$ git pull https://git.openjdk.org/jdk.git pull/24218/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 24218View PR using the GUI difftool:
$ git pr show -t 24218Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/24218.diff
Using Webrev
Link to Webrev Comment