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

Code rework, Java 21 features can be used in core system (excluding addons) #4554

Open
3 of 4 tasks
holgerfriedrich opened this issue Jan 11, 2025 · 3 comments
Open
3 of 4 tasks

Comments

@holgerfriedrich
Copy link
Member

holgerfriedrich commented Jan 11, 2025

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.

@holgerfriedrich holgerfriedrich changed the title Code rework, Java 21 features can be used in core system (excluding addons, tbc) Code rework, Java 21 features can be used in core system (excluding addons) Jan 11, 2025
@holgerfriedrich
Copy link
Member Author

@wborn have you already migrated annotations to Jakarta before? Any recommendations? Should we do this for the whole code base, including add-ons?

@wborn
Copy link
Member

wborn commented Jan 26, 2025

I haven't looked into what exactly uses these annotations in openHAB.

Sometimes there is support for both the javax and jakarta namespaces to allow for smooth migrations.

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. 👻

@ASarco
Copy link

ASarco commented Jan 31, 2025

I did a few migrations to Java21 at my job.
In some cases is just as simple as using OpenRewrite, for example for migrating Javax to Jakarta.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants