-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Migrate to Java 21 #5421
Migrate to Java 21 #5421
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev-2.x #5421 +/- ##
=============================================
- Coverage 66.80% 66.80% -0.01%
+ Complexity 15557 15556 -1
=============================================
Files 1806 1806
Lines 69821 69821
Branches 7357 7357
=============================================
- Hits 46646 46642 -4
- Misses 20718 20721 +3
- Partials 2457 2458 +1 ☔ View full report in Codecov by Sentry. |
15ca789
to
d272160
Compare
There is a transitive dependency on Netty, which has a compatibility issue with JDK 21 (https://netty.io/news/2023/09/21/4-1-99-Final.html)
@leonardehrenfried we should probably review the dependencies that are currently ignored in the Renovate configuration, some might need to be patched for JDK 21. |
It seems that it's a problem on Mac OS only. Did you hit that bug on your machine? |
d272160
to
322a457
Compare
Also, it seems that this is no longer needed as netex-java-model uses a newer version: Lines 559 to 569 in 322a457
|
I have updated all Azure dependencies so that the netty dependencies look like this now:
It's a mixture of 4.1.60 and 4.1.100. AHC hasn't had a proper release in a while but there are beta versions of AHC 3 available. Do you know what version 3 is about? |
AHC 3.0.0.Beta3 seems compatible with version 2 and uses the newest version of Netty: I build graph and ran some updaters and everything worked fine in Java 21. |
Did you try to pin the Netty version to 4.1.100? This may be cleaner than using a beta version. |
Nope, this works fine on my Linux machine and in our cloud deployment. |
I tried the Netty BOM which didn't have the desired effect. Is this what you suggested? |
Adding:
under |
It is recommended to explicitly set all direct dependencies (i.e. the one that are visible in java imports) in the pom.
However in this particular case this is an API, not an implementation, so incompatibilities would be detected at compile time. |
Thanks for that. I forgot about the scope definition and now it does what we expect it to do:
|
I simplified Jakarta dependency management in 650193c |
Summary
This migrates the build and container image to use Java 21, which is the latest LTS version with a lot of nice features.
Heads up, @miles-grant-ibigroup .