-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
8302819: Remove JAR Index #13158
8302819: Remove JAR Index #13158
Conversation
👋 Welcome back eirbjo! A progress list of the required criteria for merging this PR into |
…tool. Remove tests which depend on the jar index feature being considered during class loading.
4894a91
to
37c409e
Compare
Hello Eirik,
My understanding of https://bugs.openjdk.org/browse/JDK-8302819 is that we are removing the JAR Index since it is no longer usable in recent versions. The work, that by default disabled support for jar indexes in URLClassLoader https://bugs.openjdk.org/browse/JDK-8273473 did not deprecate the
|
Since |
I'm not entirely sure I know what you mean or suggest here, so I'll try to be explicit with what I do (think I) understand and what my reasoning is: I one of my early comments on JDK-8302819, I suggest / recommend that the deprecation and/or eventual removal of the Hooking in a simple deprecation warning in this PR would propably not require a lot of extra review cycles, perhaps the opposite. So I'm happy to do that if that is what you meant and Alan also agrees. Do you think I understood your comment? |
Sorry my previous message wasn't clear.
Yes, that's what I meant - I think we should add a warning message when that option is used, as part of these changes. I don't think we can completely remove that option in this release, since it wasn't deprecated (for removal) before, so it would be a good idea to start warning. Like you, I too would let Alan provide guidance on whether this should be done as part of this PR. |
Thanks for clarifying, Jaikiran. I think our understanding is in sync now, which is always good! |
If we include the deprecation of |
@jaikiran Do you agree with the move of |
The alternative to including it in this PR would be to do it immediately following the integration of this PR. For users it maybe does not matter much as long as two changes are included in the same JDK/Java SE version? |
With the changes in this PR, the On a related note, I see that the |
Nice, I'll try that! Do you know if the |
… use System.property instead since the 'jar' tool does not run with a SecurityManager
I ended up feeling opimistic and replaced the current code with just |
Regarding
Making it package-private did not work because of the |
…geTest test. Removing this test, the JarIndex.merge methods and a number of other JarIndex methods not used by the 'jar' tool
@jaikiran made the good observation that the Since we at the moment do not know when Becuse of this, I suggest we extend the scope of this PR to clean up |
I had a look at the existing code in the jar tool. It appears that it doesn't run with a SecurityManager - there's direct calls to |
Looking into how the deprecation warning could be implemented, it seems
This gives the following warning message on use:
Which may be overridden by using
|
I added a draft release note https://bugs.openjdk.org/browse/JDK-8305603 as a sub-task of this PR's issue https://bugs.openjdk.org/browse/JDK-8303410 |
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.
Hello Eirik, the changes look good to me. The new test that was planned for testing JarFile
and JarInputStream
when dealing with a jar containing a META-INF/INDEX.LIST
, is that something that you want to be done as a separate PR/task? It's fine with me if you want that to be done separately.
I used the inline code formatting (3 backquotes) to make the output clear, but maybe it looks differently for you or maybe your comment was while I was editing? When you are ready, press "Finalize" and that will put in the CSR queue to review. |
It looks good now, so my comment was probably made during your edits.
Done. |
I was looking into creating such a test yesterday. For With If the code is properly unreachable, then maybe we should consider removing it? In any case, since I feel the current test is somewhat dubious, I checked it into another branch here: This is perhaps better than having no tests. I'm not feeling sure about this, please let me know what you think. Perhaps @AlanBateman also has an opinion on this? |
I am not convinced we need a test but to your point Jai, Eirik, lets handle this as a separate PR/Issue and work through what we are hoping to achieve/validate |
Good. Let's agree to handle testing of dusty 'index jars' separately from this PR. |
One additional thing we could do is update the usage output for -i/--generate-index to say that the option is deprecated. Looking at |
…recated and may be removed in a future release.
Implemented as suggested. The --help output now looks like:
|
I've updated the CSR to align it with the proposed solution. Please review again and if you happy, press "Finalize". |
Thanks, Alan, this looks good to me. I have pressed "Finalize". The CSR makes promises about the Release Note. Do you think the current Release Note delivers on this promise? |
@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 149 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. 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 (@mlchung, @AlanBateman, @LanceAndersen, @jaikiran) but any other Committer may sponsor as well. ➡️ To flag this PR as ready for integration with the above commit message, type |
It seems the stars are getting aligned for this PR to be integrated. None of the current approvals apply to the latest commit d04df25, it would be good to have that Are there any other concerns left before we can integrate? |
I think we are good to go. |
/integrate |
Thanks, the PR is now ready to be sponsored by a Committer. |
/sponsor |
Going to push as commit 0d45a52.
Your commit was automatically rebased without conflicts. |
@LanceAndersen @eirbjo Pushed as commit 0d45a52. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
This PR removes the JAR index feature from the runtime:
URLClassPath
is updated to remove theenableJarIndex
system property and any code which would be called when this property wastrue
JarIndex
implementation class is moved intojdk.jartool
module.InvalidJarIndexError
exception class is removed because it falls out of usetest/jdk/sun/misc/JarIndex/metaInfFileNames/Basic.java
is removed because it depends on the JarIndex feature being presenttest/jdk/sun/misc/JarIndex/JarIndexMergeForClassLoaderTest.java
is removed because it depends on the JarIndex feature being presenttest/jdk/sun/misc/JarIndex/JarIndexMergeTest.java
is removed because it end up being the only caller of the JarIndex.merge featureJarIndex
methods/constructors which are not used by thejar -i
implementation are removed.JarIndex
is given package-private access.Progress
Issues
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/13158/head:pull/13158
$ git checkout pull/13158
Update a local copy of the PR:
$ git checkout pull/13158
$ git pull https://git.openjdk.org/jdk.git pull/13158/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 13158
View PR using the GUI difftool:
$ git pr show -t 13158
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/13158.diff
Webrev
Link to Webrev Comment