-
-
Notifications
You must be signed in to change notification settings - Fork 431
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
Java 21 language features #4535
Conversation
holgerfriedrich
commented
Jan 3, 2025
•
edited
Loading
edited
- use getFirst and getLast methods
- replace new Locale by Locale.of
- replace Paths.get by Path.of
- use ThreadLocalRandom.current().nextDouble()
- add @ Serial annotations
* use getFirst and getLast methods * replace new Locale by Locale.of * replace Paths.get by Path.of * use ThreadLocalRandom.current().nextDouble() * add @serial annotations Signed-off-by: Holger Friedrich <[email protected]>
Signed-off-by: Holger Friedrich <[email protected]>
Signed-off-by: Holger Friedrich <[email protected]>
And maybe also replace |
This should already be included. I have seen one occurrence in the code, |
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.
It looks very clean. In particular the List.getFirst()
calls. => LGTM
I assume you are working on a similar clean up in addons? But probably wait until the current round of fixes backported into 4.3 will have been completed.
@andrewfg I have not started work on the add-ons repo. Last time when I introduced the Java 17 features (mainly instanceof patterns), there were a lot of complaints by add-on authors, as they intend to build and release for the previous 4.x release. I had deliberately waited an additional release cycle (so core used Java17 features one release before). We need to discuss how we want to approach this. |
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.
lgtm, many thanks!
Wrt add-on repo: Yes, I assume there would be quite some push-back. We should probably wait until 5.0 is released, so that it is easy for maintainers to build 4.x versions of it. It will also help for backporting code to the |