Add java21-to-25 module: compile-once probes on JDK 21 and 25, removed APIs, build matrix, pinning, compact headers and containers
Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017ic4b7N4ZDbUtA3ofqAqRV
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
/** Finalization is deprecated for removal (JEP 421) but still on by default. */
|
||||
public class FinalizerProbe {
|
||||
static volatile boolean ran;
|
||||
|
||||
@SuppressWarnings("removal")
|
||||
@Override
|
||||
protected void finalize() { ran = true; }
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
new FinalizerProbe();
|
||||
for (int i = 0; i < 50 && !ran; i++) { System.gc(); Thread.sleep(20); }
|
||||
System.out.println("finalize() ran: " + ran);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user