The java-17-openjdk package is deprecated

dnf upgrade
says:
The java-17-openjdk package is deprecated

I have installed

sudo dnf list installed *java*openjdk*
Installed packages
java-17-openjdk.x86_64                                    1:17.0.14.0.7-6.fc41        updates
java-17-openjdk-headless.x86_64                           1:17.0.14.0.7-6.fc41        updates
java-21-openjdk-headless.x86_64                           1:21.0.6.0.7-6.fc41         updates

Can I
dnf remove java-17-openjdk*
without consequences ?

You could use repoquery to find if anything depends on them.

dnf repoquery -q --installed --whatrequires packagename

Here is some further instructions https://www.baeldung.com/linux/list-dependent-packages

everything seems fine

$ sudo dnf remove java-17-openjdk*
Package                                     Arch        Version                                     Repository                  Size
Removing:
 java-17-openjdk                            x86_64      1:17.0.14.0.7-6.fc41                        updates                  1.0 MiB
 java-17-openjdk-headless                   x86_64      1:17.0.14.0.7-6.fc41                        updates                183.7 MiB
Removing unused dependencies:
 mkfontscale                                x86_64      1.2.3-1.fc41                                <unknown>               49.2 KiB
 ttmkfdir                                   x86_64      3.0.9-71.fc41                               <unknown>              122.7 KiB
 xorg-x11-fonts-Type1                       noarch      7.5-39.fc41                                 <unknown>              863.3 KiB

Transaction Summary:
 Removing:           5 packages

After this operation, 186 MiB will be freed (install 0 B, remove 186 MiB).
Is this ok [y/N]: y
Running transaction
[1/6] Prepare transaction                                                                   100% |   6.0   B/s |   5.0   B |  00m01s
[2/6] Removing java-17-openjdk-1:17.0.14.0.7-6.fc41.x86_64                                  100% |  98.0   B/s |  14.0   B |  00m00s
[3/6] Removing xorg-x11-fonts-Type1-0:7.5-39.fc41.noarch                                    100% |   2.1 KiB/s |  39.0   B |  00m00s
[4/6] Removing mkfontscale-0:1.2.3-1.fc41.x86_64                                            100% | 163.0   B/s |   9.0   B |  00m00s
[5/6] Removing ttmkfdir-0:3.0.9-71.fc41.x86_64                                              100% | 250.0   B/s |   7.0   B |  00m00s
[6/6] Removing java-17-openjdk-headless-1:17.0.14.0.7-6.fc41.x86_64                         100% | 382.0   B/s | 507.0   B |  00m01s
Complete!