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

Make AntClassLoader multi-release JAR aware when it deals with java.util.jar.JarFile #5635

Merged
merged 1 commit into from
Jul 30, 2021

Conversation

basil
Copy link
Member

@basil basil commented Jul 25, 2021

See Ant Bug 62952. A straightforward backport of bz-62952 Make AntClassLoader multi-release JAR aware when it deals with java.util.jar.JarFile from Ant 1.10.6 to our forked copy of AntClassLoader.

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 with java.util.jar.JarFile.

Proposed upgrade guidelines

N/A

Submitter checklist

  • (If applicable) Jira issue is well described
  • Changelog entries and upgrade guidelines are appropriate for the audience affected by the change (users or developer, depending on the change). Examples
    • Fill-in the Proposed changelog entries section only if there are breaking changes or other changes which may require extra steps from users during the upgrade
  • Appropriate autotests or explanation to why this change has no tests
  • For dependency updates: links to external changelogs and, if possible, full diffs

Desired reviewers

@mention

Maintainer checklist

Before the changes are marked as ready-for-merge:

  • There are at least 2 approvals for the pull request and no outstanding requests for change
  • Conversations in the pull request are over OR it is explicit that a reviewer does not block the change
  • Changelog entries in the PR title and/or Proposed changelog entries are correct
  • Proper changelog labels are set so that the changelog can be generated automatically
  • If the change needs additional upgrade steps from users, upgrade-guide-needed label is set and there is a Proposed upgrade guidelines section in the PR title. (example)
  • If it would make sense to backport the change to LTS, a Jira issue must exist, be a Bug or Improvement, and be labeled as lts-candidate to be considered (see query).

@basil basil added the developer Changes which impact plugin developers label Jul 25, 2021
@timja timja requested a review from a team July 27, 2021 19:09
@timja
Copy link
Member

timja commented Jul 28, 2021

This PR is now ready for merge, after ~24 hours, we will merge it if there's no negative feedback.

Thanks!

@timja timja added the ready-for-merge The PR is ready to go, and it will be merged soon if there is no negative feedback label Jul 28, 2021
@timja timja merged commit 95f48e8 into jenkinsci:master Jul 30, 2021
renjugokulam pushed a commit to shivagowda/jenkins that referenced this pull request Aug 19, 2021
@basil basil deleted the mrjar branch September 5, 2021 18:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
developer Changes which impact plugin developers ready-for-merge The PR is ready to go, and it will be merged soon if there is no negative feedback
Projects
None yet
3 participants