harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dmitry M. Kononov" <dmitry.m.kono...@gmail.com>
Subject Re: [jira] Updated: (HARMONY-156) InputStreamReader.getEncoding() and OutputStreamWriter.getEncoding() should return a historical charset name.
Date Fri, 10 Mar 2006 11:37:39 GMT
On 3/10/06, Paulex Yang <paulex.yang@gmail.com> wrote:
>
> > 1) java/io/InputStreamReader.
> > getHistoricalName(String name) should not be public I think.
> >
> the getHistoricalName(String) is not method of InputStreamReader, but a
> method of package private internal class
> InputStreamReader.HistoricalNamesUtil, so it should be OK to be public.


Yes, you are right.


> > 2) java/io/OutputStreamWriter.getEncoding().
> > You probably meant
> >
> > if (!isOpen()) {
> >     return null;
> > }
> >
> > instead of
> >
> > if (encoder == null) {
> >     return null;
> > }
> >
> There is no corresponding isOpen() method in OutputStreamWriter, like
> InputStreamReader, it's weird but true:), and because the encoder is set
> to null at the close() method, so that the encoder==null is fine. And of
> course again, isOpen() is more self-descriptive than encoder==null, so
> this method should be added into OutputStreamWriter.


You are right again. Sorry for my issues.
The fix looks good to me now. :)

--
> Dmitry M. Kononov
> Intel Managed Runtime Division

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message