JDK-8193162 : Remove terminally deprecated methods Runtime.getLocalized{Input,Output}Stream
  • Type: CSR
  • Component: core-libs
  • Sub-Component: java.lang
  • Priority: P3
  • Status: Closed
  • Resolution: Approved
  • Fix Versions: 10
  • Submitted: 2017-12-07
  • Updated: 2017-12-09
  • Resolved: 2017-12-07
Related Reports
CSR :  
Description
Summary
-------

Remove two terminally deprecated methods from java.lang.Runtime: getLocalizedInputStrem and getLocalizedOutputStream.

Problem
-------

These methods are part of an obsolete mechanism for internationalization. They have been deprecated
since JDK 1.1, and they were deprecated for removal since JDK 9. Their implementations essentially
do nothing.

Solution
--------

Remove these methods. Nothing in the JDK depends on them, and there are no uses of
these methods by the general public as far as I can see.

Specification
-------------

Diffs below:

<pre>
--- a/src/java.base/share/classes/java/lang/Runtime.java	Wed Dec 06 17:44:31 2017 -0800
+++ b/src/java.base/share/classes/java/lang/Runtime.java	Wed Dec 06 17:56:23 2017 -0800
@@ -877,62 +877,6 @@
     }
 
     /**
-     * Creates a localized version of an input stream. This method takes
-     * an {@code InputStream} and returns an {@code InputStream}
-     * equivalent to the argument in all respects except that it is
-     * localized: as characters in the local character set are read from
-     * the stream, they are automatically converted from the local
-     * character set to Unicode.
-     * &lt;p>
-     * If the argument is already a localized stream, it may be returned
-     * as the result.
-     *
-     * @param      in InputStream to localize
-     * @return     a localized input stream
-     * @see        java.io.InputStream
-     * @see        java.io.BufferedReader#BufferedReader(java.io.Reader)
-     * @see        java.io.InputStreamReader#InputStreamReader(java.io.InputStream)
-     * @deprecated As of JDK&nbsp;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;
-    }
-
-    /**
-     * Creates a localized version of an output stream. This method
-     * takes an {@code OutputStream} and returns an
-     * {@code OutputStream} equivalent to the argument in all respects
-     * except that it is localized: as Unicode characters are written to
-     * the stream, they are automatically converted to the local
-     * character set.
-     * &lt;p>
-     * If the argument is already a localized stream, it may be returned
-     * as the result.
-     *
-     * @deprecated As of JDK&nbsp;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;
-    }
-
-    /**
      * Returns the version of the Java Runtime Environment as a {@link Version}.
      *
      * @return  the {@link Version} of the Java Runtime Environment
</pre>

Comments
Moving to approved.
07-12-2017