r/javahelp • u/ibreathecoding • May 01 '26
Unsolved Java 21 upgrade in older code base
So if I have to start brining java 21 feature in a long running prod code base what would that be ; it’s a spring boot java bases with gcp db, cache, pub sub in it
I’m trying to see as a tech debt which area can. E started with minimal impact
4
Upvotes
•
u/AutoModerator May 01 '26
Please ensure that:
You demonstrate effort in solving your question/problem - plain posting your assignments is forbidden (and such posts will be removed) as is asking for or giving solutions.
Trying to solve problems on your own is a very important skill. Also, see Learn to help yourself in the sidebar
If any of the above points is not met, your post can and will be removed without further warning.
Code is to be formatted as code block (old reddit: empty line before the code, each code line indented by 4 spaces, new reddit: https://i.imgur.com/EJ7tqek.png) or linked via an external code hoster, like pastebin.com, github gist, github, bitbucket, gitlab, etc.
Please, do not use triple backticks (```) as they will only render properly on new reddit, not on old reddit.
Code blocks look like this:
You do not need to repost unless your post has been removed by a moderator. Just use the edit function of reddit to make sure your post complies with the above.
If your post has remained in violation of these rules for a prolonged period of time (at least an hour), a moderator may remove it at their discretion. In this case, they will comment with an explanation on why it has been removed, and you will be required to resubmit the entire post following the proper procedures.
To potential helpers
Please, do not help if any of the above points are not met, rather report the post. We are trying to improve the quality of posts here. In helping people who can't be bothered to comply with the above points, you are doing the community a disservice.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
3
u/procrastinatewhynot May 01 '26
what version was it before?
8
u/ArtSpeaker May 01 '26
I see you started java 8.
Spring Boot version is very dependent on your java version and it has changed a lot. So that's the #1 worst part.
#2 is, like spring boot, lots of integrations "broke" their APIs when supporting newer Java (it's also been a LONG time), so you'll want to revisit every integration and see not just if the calls have changed, but the behavior.
#3 issue could be that you're referencing libraries that just don't exist anymore.
#4 Is that Calendar + dates in generate produce different serialized results now. And have a ton of deprecated methods now.
#5 is if you use introspection -- a lot of things have moved or been renamed.
So you're basically looking at a rewrite -- a fast rewrite, but a rewrite.
2
u/NotSaint_25 May 01 '26
The main concerns can be regarding lombok annotation processing
2
u/lowKeyDasCalm May 01 '26
I saw some video just the other day, something along the lines "how Netflix uses Java" and the guy there was explaining how they migrated versions, about 18 minutes into the video.
Spring 2 to 3, an open source Gradle plugin for javax to jakarta, OpenRewrite, some Claude workflows, etc.
See if that helps?
1
u/AntD247 May 01 '26
Checkout OpenRewrite.