RFR(s): 8177681: Remove methods Runtime.getLocalized{Input,Output}Stream
Roger Riggs
Roger.Riggs at Oracle.com
Wed Dec 6 22:47:28 UTC 2017
+1, About time!
On 12/6/2017 5:33 PM, Stuart Marks wrote:
> Hi all,
>
> Please review the removal of these methods, which were part of an
> obsolete internationalization mechanism. They were deprecated in JDK
> 1.1 and deprecated for removal in JDK 9. As far as I can see, there is
> no usage of these methods anywhere.
>
> Bug link:
>
> https://bugs.openjdk.java.net/browse/JDK-8177681
>
> Diffs below.
>
> s'marks
>
> diff -r 6ee80cd217e0 -r 3443fda73ab6
> src/java.base/share/classes/java/lang/Runtime.java
> --- a/src/java.base/share/classes/java/lang/Runtime.java Mon Dec 04
> 11:50:04 2017 -0800
> +++ b/src/java.base/share/classes/java/lang/Runtime.java Wed Dec 06
> 13:55:35 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.
> - * <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 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.
> - * <p>
> - * If the argument is already a localized stream, it may be returned
> - * as the result.
> - *
> - * @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;
> - }
> -
> - /**
> * Returns the version of the Java Runtime Environment as a
> {@link Version}.
> *
> * @return the {@link Version} of the Java Runtime Environment
More information about the core-libs-dev
mailing list