[suggestion] project jdk upgrade

已回答

Hello everyone

 

is their simple way to upgrade project from certain version of jdk to a newer version

for example

if we have project that used jdk 11 and we want to upgrade it to jdk 17 (changing the target jdk is not the issue here or changing the tool chain in gradle or whatever build tool we used)

each file could have

1) deprecated use of method/class

2) since newer version could bring new options to the language so the jdk suggest that to use the new option like have immutable class it could be converted to record and using the new pattern match maybe with instance of or switch and many other

since each project could have hundreds or thousands of files so open each file to check each file for the above would be time consuming

so

would not it be easier to have wizard or something that show us a summery of the process so it till us which file that has deprecated or removed code or better coding so we can fix those in shorter time

 

i agree the ide suggestion does not mean it cover everything but it already cover a lot of things that could help us speed the process and this way it could allow the user to give feedback about the suggestion to improve it more

not sure if that option exist in the ultimate version or not but at least i can not find it in community version (sorry if it there and i did not look carfully)

thanks for your time and have a nice day :)

0

IntelliJ IDEA has Java language level migration inspections:

You can create a separate inspection profile and only enable the inspections that will be relevant for your codebase. Then, you can go to Code | Inspect Code, choose your profile and scope, and then run all of the inspections at once.

The results will pop up in the 'Problems' view where you can inspect them and apply suggested quick fixes.

You might want to also look into migration maps: https://www.jetbrains.com/help/idea/migrate.html

1

thanks a lot @... looks like i did not search as i should be

 

thanks again and have a nice day :)

0

请先登录再写评论。