< prev index next >
src/java.base/share/classes/java/lang/Runtime.java
Print this page
rev 14117 : 8145468: update java.lang APIs with new deprecations
Reviewed-by: XXX
*** 287,307 ****
* @param value true to enable finalization on exit, false to disable
* @deprecated This method is inherently unsafe. It may result in
* finalizers being called on live objects while other threads are
* concurrently manipulating those objects, resulting in erratic
* behavior or deadlock.
*
* @throws SecurityException
* if a security manager exists and its {@code checkExit}
* method doesn't allow the exit.
*
* @see java.lang.Runtime#exit(int)
* @see java.lang.Runtime#gc()
* @see java.lang.SecurityManager#checkExit(int)
* @since 1.1
*/
! @Deprecated
public static void runFinalizersOnExit(boolean value) {
SecurityManager security = System.getSecurityManager();
if (security != null) {
try {
security.checkExit(0);
--- 287,308 ----
* @param value true to enable finalization on exit, false to disable
* @deprecated This method is inherently unsafe. It may result in
* finalizers being called on live objects while other threads are
* concurrently manipulating those objects, resulting in erratic
* behavior or deadlock.
+ * This method is subject to removal in a future version of Java SE.
*
* @throws SecurityException
* if a security manager exists and its {@code checkExit}
* method doesn't allow the exit.
*
* @see java.lang.Runtime#exit(int)
* @see java.lang.Runtime#gc()
* @see java.lang.SecurityManager#checkExit(int)
* @since 1.1
*/
! @Deprecated(since="1.2", forRemoval=true)
public static void runFinalizersOnExit(boolean value) {
SecurityManager security = System.getSecurityManager();
if (security != null) {
try {
security.checkExit(0);
*** 892,903 ****
* @see java.io.InputStreamReader#InputStreamReader(java.io.InputStream)
* @deprecated As of JDK 1.1, the preferred way to translate a byte
* stream in the local encoding into a character stream in Unicode is via
* the {@code InputStreamReader} and {@code BufferedReader}
* classes.
*/
! @Deprecated
public InputStream getLocalizedInputStream(InputStream in) {
return in;
}
/**
--- 893,905 ----
* @see java.io.InputStreamReader#InputStreamReader(java.io.InputStream)
* @deprecated As of JDK 1.1, the preferred way to translate a byte
* stream in the local encoding into a character stream in Unicode is via
* the {@code InputStreamReader} and {@code BufferedReader}
* classes.
+ * This method is subject to removal in a future version of Java SE.
*/
! @Deprecated(since="1.1", forRemoval=true)
public InputStream getLocalizedInputStream(InputStream in) {
return in;
}
/**
*** 913,931 ****
*
* @deprecated As of JDK 1.1, the preferred way to translate a
* Unicode character stream into a byte stream in the local encoding is via
* the {@code OutputStreamWriter}, {@code BufferedWriter}, and
* {@code PrintWriter} classes.
*
* @param out OutputStream to localize
* @return a localized output stream
* @see java.io.OutputStream
* @see java.io.BufferedWriter#BufferedWriter(java.io.Writer)
* @see java.io.OutputStreamWriter#OutputStreamWriter(java.io.OutputStream)
* @see java.io.PrintWriter#PrintWriter(java.io.OutputStream)
*/
! @Deprecated
public OutputStream getLocalizedOutputStream(OutputStream out) {
return out;
}
}
--- 915,934 ----
*
* @deprecated As of JDK 1.1, the preferred way to translate a
* Unicode character stream into a byte stream in the local encoding is via
* the {@code OutputStreamWriter}, {@code BufferedWriter}, and
* {@code PrintWriter} classes.
+ * This method is subject to removal in a future version of Java SE.
*
* @param out OutputStream to localize
* @return a localized output stream
* @see java.io.OutputStream
* @see java.io.BufferedWriter#BufferedWriter(java.io.Writer)
* @see java.io.OutputStreamWriter#OutputStreamWriter(java.io.OutputStream)
* @see java.io.PrintWriter#PrintWriter(java.io.OutputStream)
*/
! @Deprecated(since="1.1", forRemoval=true)
public OutputStream getLocalizedOutputStream(OutputStream out) {
return out;
}
}
< prev index next >