-
-
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
Code rework, Java 21 features can be used in core system (excluding addons) #4554
Comments
@wborn have you already migrated annotations to Jakarta before? Any recommendations? Should we do this for the whole code base, including add-ons? |
I haven't looked into what exactly uses these annotations in openHAB. Sometimes there is support for both the Usually I prefer to migrate everything to the jakarta namespace for simplicity if possible. It also prevents devs from copy/pasting the deprecated javax namespace into new code. This way the javax code stops haunting you. 👻 |
I did a few migrations to Java21 at my job. |
Thanks @ASarco for mentioning this tool. I agree, for some use cases it works quite well. For others, some manual changes are necessary. Url/Uri replacements, for example, did not cover the modifications to exception handling. |
Java 21 language features can be used in core. Java 21 is delayed for add-ons (can be used in single plugins if owner wants it, but will not be rolled out over the whole repo until OH 5 is released in summer 2025).
Clean up the code and build system, port to Java 21, deprecations, etc. - this refers mainly to core, but can also include distro, webui.
javax.annotation
byjakarta.annotation
https://docs.openrewrite.org/recipes/java/migrate/jakarta/javaxannotationmigrationtojakartaannotationThe text was updated successfully, but these errors were encountered: