Make AntClassLoader
multi-release JAR aware when it deals with java.util.jar.JarFile
#5635
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See Ant Bug 62952. A straightforward backport of bz-62952 Make
AntClassLoader
multi-release JAR aware when it deals withjava.util.jar.JarFile
from Ant 1.10.6 to our forked copy ofAntClassLoader
.Testing Done
I built a multi-release JAR from this demo project and stuck it into a tiny plugin, then ran the plugin in Jenkins with
java -jar jenkins.war
before and after this change (Java 11 runtime). Before this change, it printed "Provider:RuntimeMXBean
", meaning it was using the Java 8 code from the multi-release JAR. After this change, it printed "Provider:ProcessHandle
", meaning it was using the Java 11 code from the multi-release JAR.Proposed changelog entries
Developer: Make
AntClassLoader
multi-release JAR aware when it deals withjava.util.jar.JarFile
.Proposed upgrade guidelines
N/A
Submitter checklist
Proposed changelog entries
section only if there are breaking changes or other changes which may require extra steps from users during the upgradeDesired reviewers
@mention
Maintainer checklist
Before the changes are marked as
ready-for-merge
:Proposed changelog entries
are correctupgrade-guide-needed
label is set and there is aProposed upgrade guidelines
section in the PR title. (example)lts-candidate
to be considered (see query).