Return-Path: Delivered-To: apmail-incubator-harmony-dev-archive@www.apache.org Received: (qmail 13798 invoked from network); 13 Jul 2006 03:36:24 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 13 Jul 2006 03:36:24 -0000 Received: (qmail 14427 invoked by uid 500); 13 Jul 2006 03:36:19 -0000 Delivered-To: apmail-incubator-harmony-dev-archive@incubator.apache.org Received: (qmail 14373 invoked by uid 500); 13 Jul 2006 03:36:19 -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 14362 invoked by uid 99); 13 Jul 2006 03:36:19 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 Jul 2006 20:36:19 -0700 X-ASF-Spam-Status: No, hits=1.9 required=10.0 tests=DNS_FROM_RFC_ABUSE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: 202.81.18.155 is neither permitted nor denied by domain of firepure@gmail.com) Received: from [202.81.18.155] (HELO ausmtp06.au.ibm.com) (202.81.18.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 Jul 2006 20:36:18 -0700 Received: from sd0208e0.au.ibm.com (d23rh904.au.ibm.com [202.81.18.202]) by ausmtp06.au.ibm.com (8.13.6/8.13.6) with ESMTP id k6D3bYLi7176282 for ; Thu, 13 Jul 2006 13:37:41 +1000 Received: from d23av03.au.ibm.com (d23av03.au.ibm.com [9.190.250.244]) by sd0208e0.au.ibm.com (8.12.10/NCO/VER6.8) with ESMTP id k6D3d9Bw228672 for ; Thu, 13 Jul 2006 13:39:09 +1000 Received: from d23av03.au.ibm.com (loopback [127.0.0.1]) by d23av03.au.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id k6D3Zk90011072 for ; Thu, 13 Jul 2006 13:35:46 +1000 Received: from d23m0011.cn.ibm.com ([9.181.32.74]) by d23av03.au.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id k6D3ZkGt009835 for ; Thu, 13 Jul 2006 13:35:46 +1000 Received: from [9.181.107.166] ([9.181.107.166]) by d23m0011.cn.ibm.com (Lotus Domino Release 6.5.5HF262) with ESMTP id 2006071311342776-2014 ; Thu, 13 Jul 2006 11:34:27 +0800 Message-ID: <44B5BF3F.8050409@gmail.com> Date: Thu, 13 Jul 2006 11:34:23 +0800 From: "Jimmy, Jing Lv" User-Agent: Thunderbird 1.5.0.4 (Windows/20060516) MIME-Version: 1.0 To: harmony-dev@incubator.apache.org Subject: I18N on native (was:Re: [jira] Commented: (HARMONY-815) [classlib][nio] Refine implConfigureBlocking(boolean) method of DatagramChannel and SocketChannel.) X-MIMETrack: Itemize by SMTP Server on D23M0011/23/M/IBM(Release 6.5.5HF262 | April 5, 2006) at 13/07/2006 11:34:27, Serialize by Router on D23M0011/23/M/IBM(Release 6.5.5HF262 | April 5, 2006) at 13/07/2006 11:35:46, Serialize complete at 13/07/2006 11:35:46 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 Hi: I'd like to raise the topic on I18N of native code. As discussed about patch-815, we found there are exceptions thrown by native code with un-internationalized error message. To resolve this problem, there may be two solutions: 1) make native code return error code instead of throw exceptions, and let Java code deal with these errors. This seems pretty good, and also resolve such problems like 815, but require much more effort to refactor all native and Java codes. What's more, as some native methods do not return an integer at all, we may add an output parameter to them, at least for network-related luni/nio, there are about 10 methods like this. 2) As it is still easy for native code to call Java code, so rewrite error-message-lookup native method to lookup internationalized message, e.g., call MsgUtil.getString(). This refactor may be easy, but to JIRA-815 and other message-dependent Java code, it do no help. So it still requires other refactoring, e.g., return error code in some situation like suggested in (1). Another solution can be: catch exceptions on Java code, replace its message, and throw out again, this may be too ugly, so I do not suggest so. Any suggestions? Thanks! -- Best Regards! Jimmy, Jing Lv China Software Development Lab, IBM --------------------------------------------------------------------- Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org For additional commands, e-mail: harmony-dev-help@incubator.apache.org