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

JDK24 support #2284

Merged
merged 4 commits into from
Apr 1, 2025
Merged

JDK24 support #2284

merged 4 commits into from
Apr 1, 2025

Conversation

kanderson250
Copy link
Contributor

@kanderson250 kanderson250 commented Mar 27, 2025

This PR adds support for running the agent in JRE 24. Resolves #2241

During our evaluation of Java 24, we did uncover one issue, which was in our instrumentation of java/lang/ClassLoader . Due to some Java 24 updates to the initSystemClassLoader method, the agent caused a VerifyError in this class because of its resolution of the superclass of Throwable and Exception. This is explained in more detail in the updates to PatchedClassWriter.

Also, the jms-3 test has been limited to LTS versions <24 because of test dependency ActiveMQ's use of the security manager api (which was removed in JDK24).

(Edit: the AITs tests are expected to fail, because they also need to be configured to run with 24. I have a branch for that jdk24-support in the AITs repo, which will be merged after this PR. Here is a GHA of the PR test suite against that branch: https://github.com/newrelic/newrelic-java-agent/actions/runs/14116167431)

@codecov-commenter
Copy link

codecov-commenter commented Mar 27, 2025

Codecov Report

Attention: Patch coverage is 40.00000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 70.81%. Comparing base (875b6e3) to head (163aba7).
Report is 34 commits behind head on main.

Files with missing lines Patch % Lines
...a/com/newrelic/weave/utils/PatchedClassWriter.java 0.00% 1 Missing and 2 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #2284      +/-   ##
============================================
+ Coverage     70.65%   70.81%   +0.15%     
- Complexity    10023    10244     +221     
============================================
  Files           844      844              
  Lines         40507    41478     +971     
  Branches       6140     6364     +224     
============================================
+ Hits          28619    29371     +752     
- Misses         9108     9288     +180     
- Partials       2780     2819      +39     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@kanderson250 kanderson250 merged commit f8ae0cf into main Apr 1, 2025
174 of 218 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Code Complete/Done
Development

Successfully merging this pull request may close these issues.

java jdk 24 compatibility
4 participants