Return-Path: Delivered-To: apmail-incubator-harmony-dev-archive@www.apache.org Received: (qmail 56405 invoked from network); 10 Mar 2006 09:37:53 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 10 Mar 2006 09:37:53 -0000 Received: (qmail 95842 invoked by uid 500); 10 Mar 2006 09:37:44 -0000 Delivered-To: apmail-incubator-harmony-dev-archive@incubator.apache.org Received: (qmail 95784 invoked by uid 500); 10 Mar 2006 09:37:44 -0000 Mailing-List: contact harmony-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: harmony-dev@incubator.apache.org Delivered-To: mailing list harmony-dev@incubator.apache.org Received: (qmail 95773 invoked by uid 99); 10 Mar 2006 09:37:44 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 10 Mar 2006 01:37:44 -0800 X-ASF-Spam-Status: No, hits=1.4 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: 202.81.18.152 is neither permitted nor denied by domain of paulex.yang@gmail.com) Received: from [202.81.18.152] (HELO ausmtp04.au.ibm.com) (202.81.18.152) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 10 Mar 2006 01:37:42 -0800 Received: from sd0112e0.au.ibm.com (d23rh903.au.ibm.com [202.81.18.201]) by ausmtp04.au.ibm.com (8.12.10/8.13.5) with ESMTP id k2A9isqQ272190 for ; Fri, 10 Mar 2006 20:44:54 +1100 Received: from d23av02.au.ibm.com (d23av02.au.ibm.com [9.190.250.243]) by sd0112e0.au.ibm.com (8.12.10/NCO/VER6.8) with ESMTP id k2A9eLrS236470 for ; Fri, 10 Mar 2006 20:40:28 +1100 Received: from d23av02.au.ibm.com (loopback [127.0.0.1]) by d23av02.au.ibm.com (8.12.11/8.13.3) with ESMTP id k2A9aCM8027752 for ; Fri, 10 Mar 2006 20:36:13 +1100 Received: from d23m0011.cn.ibm.com (d23m0011.cn.ibm.com [9.181.32.74]) by d23av02.au.ibm.com (8.12.11/8.12.11) with ESMTP id k2A9Zr1K027234 for ; Fri, 10 Mar 2006 20:36:11 +1100 Received: from [127.0.0.1] ([9.181.106.208]) by d23m0011.cn.ibm.com (Lotus Domino Release 6.53HF294) with ESMTP id 2006031017305209-10509 ; Fri, 10 Mar 2006 17:30:52 +0800 Message-ID: <4411474A.9070805@gmail.com> Date: Fri, 10 Mar 2006 17:30:50 +0800 From: Paulex Yang User-Agent: Thunderbird 1.5 (Windows/20051201) MIME-Version: 1.0 To: harmony-dev@incubator.apache.org Subject: Re: [jira] Updated: (HARMONY-156) InputStreamReader.getEncoding() and OutputStreamWriter.getEncoding() should return a historical charset name. References: <839564812.1141787621012.JavaMail.jira@ajax> <98e7db8d0603090540k219c68abn48b482ea4ac4415f@mail.gmail.com> In-Reply-To: <98e7db8d0603090540k219c68abn48b482ea4ac4415f@mail.gmail.com> X-MIMETrack: Itemize by SMTP Server on D23M0011/23/M/IBM(Release 6.53HF294 | January 28, 2005) at 10/03/2006 17:30:52, Serialize by Router on D23M0011/23/M/IBM(Release 6.53HF294 | January 28, 2005) at 10/03/2006 17:36:11, Serialize complete at 10/03/2006 17:36:11 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=ISO-8859-1; format=flowed X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Kononov, Thank you to point out these. My comments below. Dmitry M. Kononov wrote: > Paulex, > > I have some thoughts about the patch. It looks good but the following two > things: > > 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. And of course, it is more precise to make it package private. > 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. > since this method returns null if the stream has been closed. > > Thanks. > > On 3/8/06, Paulex Yang (JIRA) wrote: > >> [ http://issues.apache.org/jira/browse/HARMONY-156?page=all ] >> >> Paulex Yang updated HARMONY-156: >> -------------------------------- >> >> Attachment: patch_156.txt >> patch_156_test.txt >> >> As no one has better idea than my prior proposal, i.e., save the mapping >> between historical name and canonical name, I created the patch for this >> solution. The affected package is luni/java.io. >> >> -- >> Dmitry M. Kononov >> Intel Managed Runtime Division >> > > -- Paulex Yang China Software Development Lab IBM