8331670: Deprecate the Memory-Access Methods in sun.misc.Unsafe for Removal

Reviewed-by: mcimadamore, jpai, pminborg
This commit is contained in:
Alan Bateman 2024-05-28 15:05:54 +00:00
parent 51ae08f72b
commit 0f3e2cc334
8 changed files with 1229 additions and 84 deletions

View file

@ -212,7 +212,11 @@ java.launcher.X.usage=\n\
\ --finalization=<value>\n\
\ controls whether the JVM performs finalization of objects,\n\
\ where <value> is one of "enabled" or "disabled".\n\
\ Finalization is enabled by default.\n\n\
\ Finalization is enabled by default.\n\
\ --sun-misc-unsafe-memory-access=<value>\n\
\ allow or deny usage of unsupported API sun.misc.Unsafe\n\
\ <value> is one of "allow", "warn", "debug", or "deny".\n\
\ The default value is "allow".\n\n\
These extra options are subject to change without notice.\n
# Translators please note do not translate the options themselves

View file

@ -1194,6 +1194,30 @@ or directories.
.TP
\f[V]--source\f[R] \f[I]version\f[R]
Sets the version of the source in source-file mode.
.TP
\f[V]--sun-misc-unsafe-memory-acces=\f[R] \f[I]value\f[R]
Allow or deny usage of unsupported API \f[V]sun.misc.Unsafe\f[R].
\f[I]value\f[R] is one of:
.RS
.TP
\f[V]allow\f[R]
Allow use of the memory-access methods with no warnings at run time.
.TP
\f[V]warn\f[R]
Allow use of the memory-access methods, but issues a warning on the
first occasion that any memory-access method is used.
At most one warning is issued.
.TP
\f[V]debug\f[R]
Allow use of the memory-access methods, but issue a one-line warning and
a stack trace when any memory-access method is used.
.TP
\f[V]deny\f[R]
Disallow use of the memory-access methods by throwing an
\f[V]UnsupportedOperationException\f[R] on every usage.
.PP
The default value when the option is not specified is \f[V]allow\f[R].
.RE
.SH EXTRA OPTIONS FOR MACOS
.PP
The following extra options are macOS specific.