JDK 24 |
---|
24 b23Fixed |
Causes :
|
|
Causes :
|
|
Causes :
|
|
Cloners :
|
|
Cloners :
|
|
Relates :
|
The following example shows that 'compiler.warn.sun.proprietary' diagnostics are not emitted if --system is configured to an earlier JDK version. I expected the diagnostics to be emitted for both configurations. The diagnostics are consistently emitted for different configurations of --release. cat A.java class A { sun.misc.Unsafe theUnsafe; } $JAVA21_HOME/bin/java -fullversion openjdk full version "21.0.2+13-58" $JAVA11_HOME/bin/java -fullversion openjdk full version "11.0.16+8" $JAVA21_HOME/bin/javac --system $JAVA21_HOME A.java A.java:2: warning: Unsafe is internal proprietary API and may be removed in a future release sun.misc.Unsafe theUnsafe; ^ 1 warning $JAVA21_HOME/bin/javac --system $JAVA11_HOME A.java ... no diagnostics
|