Add migration-17-25 module: Java 17 class files run on 17 and 25, flags, removed APIs, jdeps and jdeprscan
Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Gth99spB1CzQmBFofXmU4Z
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
# 01-runtime-behaviour: classes compiled once with JDK 17 (--release 17), run unchanged on 17 and 25; LC_ALL=C
|
||||
--- SecurityManagerProbe
|
||||
[17.0.20.1] WARNING: A terminally deprecated method in java.lang.System has been called
|
||||
[17.0.20.1] WARNING: System::setSecurityManager has been called by SecurityManagerProbe (file:/tmp/migration-17-25-work/c17/)
|
||||
[17.0.20.1] WARNING: Please consider reporting this to the maintainers of SecurityManagerProbe
|
||||
[17.0.20.1] WARNING: System::setSecurityManager will be removed in a future release
|
||||
[17.0.20.1] installed: true
|
||||
[25.0.4.1] failed: java.lang.UnsupportedOperationException: Setting a Security Manager is not supported
|
||||
--- ThreadStopProbe
|
||||
[17.0.20.1] stop() accepted; thread alive afterwards: false
|
||||
[25.0.4.1] stop() failed: java.lang.UnsupportedOperationException
|
||||
--- CharsetProbe
|
||||
[17.0.20.1] Charset.defaultCharset() = US-ASCII
|
||||
[17.0.20.1] bytes written for the 4-letter word with an accent = 4 (UTF-8 would be 5)
|
||||
[25.0.4.1] Charset.defaultCharset() = UTF-8
|
||||
[25.0.4.1] bytes written for the 4-letter word with an accent = 5 (UTF-8 would be 5)
|
||||
--- FinalizerProbe
|
||||
[17.0.20.1] finalize() ran: true
|
||||
[25.0.4.1] finalize() ran: true
|
||||
--- UnsafeProbe
|
||||
[17.0.20.1] read back: 42
|
||||
[25.0.4.1] WARNING: A terminally deprecated method in sun.misc.Unsafe has been called
|
||||
[25.0.4.1] WARNING: sun.misc.Unsafe::allocateMemory has been called by UnsafeProbe (file:/tmp/migration-17-25-work/c17/)
|
||||
[25.0.4.1] WARNING: Please consider reporting this to the maintainers of class UnsafeProbe
|
||||
[25.0.4.1] WARNING: sun.misc.Unsafe::allocateMemory will be removed in a future release
|
||||
[25.0.4.1] read back: 42
|
||||
--- SecurityManagerProbe with -Djava.security.manager=allow
|
||||
[17.0.20.1] WARNING: A terminally deprecated method in java.lang.System has been called
|
||||
[17.0.20.1] WARNING: System::setSecurityManager has been called by SecurityManagerProbe (file:/tmp/migration-17-25-work/c17/)
|
||||
[17.0.20.1] WARNING: Please consider reporting this to the maintainers of SecurityManagerProbe
|
||||
[25.0.4.1] Error occurred during initialization of VM
|
||||
[25.0.4.1] java.lang.Error: A command line option has attempted to allow or enable the Security Manager. Enabling a Security Manager is not supported.
|
||||
[25.0.4.1] at java.lang.System.initPhase3([email protected]/System.java:1970)
|
||||
@@ -0,0 +1,11 @@
|
||||
# flag | JDK 17 | JDK 25 (exit code: first warning or error line)
|
||||
-Djava.security.manager=allow | exit 0: (no message) | exit 1: Error occurred during initialization of VM
|
||||
-XX:+UseBiasedLocking | exit 0: Option UseBiasedLocking was deprecated in version 15.0 and will likely be removed in a future release. | exit 1: Unrecognized VM option 'UseBiasedLocking'
|
||||
-XX:+UseConcMarkSweepGC | exit 1: Unrecognized VM option 'UseConcMarkSweepGC' | exit 1: Unrecognized VM option 'UseConcMarkSweepGC'
|
||||
-XX:+AggressiveOpts | exit 1: Unrecognized VM option 'AggressiveOpts' | exit 1: Unrecognized VM option 'AggressiveOpts'
|
||||
-XX:MaxPermSize=128m | exit 1: Unrecognized VM option 'MaxPermSize=128m' | exit 1: Unrecognized VM option 'MaxPermSize=128m'
|
||||
-XX:+UseParallelOldGC | exit 1: Unrecognized VM option 'UseParallelOldGC' | exit 1: Unrecognized VM option 'UseParallelOldGC'
|
||||
-Xverify:none | exit 0: Options -Xverify:none and -noverify were deprecated in JDK 13 and will likely be removed in a future release. | exit 0: Options -Xverify:none and -noverify were deprecated in JDK 13 and will likely be removed in a future release.
|
||||
-XX:-UseCompressedClassPointers | exit 0: (no message) | exit 0: Option UseCompressedClassPointers was deprecated in version 25.0 and will likely be removed in a future release.
|
||||
-XX:+ParallelRefProcEnabled | exit 0: (no message) | exit 0: (no message)
|
||||
-XX:+UseStringDeduplication | exit 0: (no message) | exit 0: (no message)
|
||||
@@ -0,0 +1,9 @@
|
||||
# 03-compile-removed-apis: javac -Xlint:removal on JDK 17 and JDK 25
|
||||
UsesCompiler.java [17.0.20.1] [removal] Compiler in java.lang has been deprecated and marked for removal
|
||||
UsesCompiler.java [25.0.4.1] cannot find symbol
|
||||
UsesRunFinalization.java [17.0.20.1] compiles cleanly
|
||||
UsesRunFinalization.java [25.0.4.1] [removal] runFinalization() in Runtime has been deprecated and marked for removal
|
||||
UsesThreadGroupDestroy.java [17.0.20.1] [removal] destroy() in ThreadGroup has been deprecated and marked for removal
|
||||
UsesThreadGroupDestroy.java [25.0.4.1] [removal] destroy() in ThreadGroup has been deprecated and marked for removal
|
||||
UsesThreadSuspend.java [17.0.20.1] [removal] suspend() in Thread has been deprecated and marked for removal
|
||||
UsesThreadSuspend.java [25.0.4.1] cannot find symbol
|
||||
@@ -0,0 +1,16 @@
|
||||
# 04-jdeps-jdeprscan (scanning probes.jar, built by JDK 17, with the JDK 25 tools)
|
||||
--- jdeps --jdk-internals
|
||||
probes.jar -> jdk.unsupported
|
||||
UnsafeProbe -> sun.misc.Unsafe JDK internal API (jdk.unsupported)
|
||||
--- jdeprscan --release 17 --for-removal
|
||||
Jar file probes.jar:
|
||||
class SecurityManagerProbe uses deprecated class java/lang/SecurityManager (forRemoval=true)
|
||||
class SecurityManagerProbe uses deprecated method java/lang/System::setSecurityManager(Ljava/lang/SecurityManager;)V (forRemoval=true)
|
||||
class SecurityManagerProbe uses deprecated method java/lang/System::getSecurityManager()Ljava/lang/SecurityManager; (forRemoval=true)
|
||||
--- jdeprscan --release 25 --for-removal
|
||||
Jar file probes.jar:
|
||||
class FinalizerProbe$Res overrides deprecated method java/lang/Object::finalize()V (forRemoval=true)
|
||||
class SecurityManagerProbe uses deprecated class java/lang/SecurityManager (forRemoval=true)
|
||||
class SecurityManagerProbe uses deprecated method java/lang/System::setSecurityManager(Ljava/lang/SecurityManager;)V (forRemoval=true)
|
||||
class SecurityManagerProbe uses deprecated method java/lang/System::getSecurityManager()Ljava/lang/SecurityManager; (forRemoval=true)
|
||||
class ThreadStopProbe uses deprecated method java/lang/Thread::stop()V (forRemoval=true)
|
||||
@@ -0,0 +1,17 @@
|
||||
# 05-gc-defaults (no flags, same 2-CPU machine)
|
||||
--- JDK 17.0.20.1
|
||||
InitialHeapSize = 98566144
|
||||
MaxHeapSize = 1570766848
|
||||
UseG1GC = true
|
||||
collector: G1 Young Generation
|
||||
collector: G1 Old Generation
|
||||
processors: 2
|
||||
--- JDK 25.0.4.1
|
||||
InitialHeapSize = 98566144
|
||||
MaxHeapSize = 1570766848
|
||||
UseCompactObjectHeaders = false
|
||||
UseG1GC = true
|
||||
collector: G1 Young Generation
|
||||
collector: G1 Concurrent GC
|
||||
collector: G1 Old Generation
|
||||
processors: 2
|
||||
@@ -0,0 +1,5 @@
|
||||
# 06-legacy-stack-on-25: mvn test on JDK 25 for four generations of the same app (bytecode target is release 17 in every row)
|
||||
Spring Boot 2.7.18 (Spring 5.3, Hibernate 5.6): Tests run: 1, Failures: 0, Errors: 0, Skipped: 0 BUILD SUCCESS
|
||||
Spring Boot 3.5.16: Tests run: 1, Failures: 0, Errors: 0, Skipped: 0 BUILD SUCCESS
|
||||
Spring Boot 4.0.8: Tests run: 1, Failures: 0, Errors: 0, Skipped: 0 BUILD SUCCESS
|
||||
Spring Boot 4.1.1: Tests run: 1, Failures: 0, Errors: 0, Skipped: 0 BUILD SUCCESS
|
||||
@@ -0,0 +1,6 @@
|
||||
# 07-framework-minimums (quoted from vendor documentation on 2026-09-28; NOT produced by running code)
|
||||
Spring Boot 4.1.1 system requirements (https://docs.spring.io/spring-boot/system-requirements.html):
|
||||
"Spring Boot 4.1.1 requires at least Java 17 and is compatible with versions up to and including Java 26."
|
||||
Spring Framework 7.0.9 or above; Maven 3.6.3 or later; Gradle 8.14 or later, and 9.x
|
||||
Gradle Java compatibility (https://docs.gradle.org/current/userguide/compatibility.html), "support for running Gradle":
|
||||
Java 21: 8.5 and after | Java 24: 8.14 and after | Java 25: 9.1.0 and after | Java 26: 9.4.0 and after
|
||||
Reference in New Issue
Block a user