Return-Path: Delivered-To: apmail-incubator-harmony-dev-archive@www.apache.org Received: (qmail 67104 invoked from network); 19 Oct 2006 10:06:34 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 19 Oct 2006 10:06:34 -0000 Received: (qmail 19523 invoked by uid 500); 19 Oct 2006 10:06:31 -0000 Delivered-To: apmail-incubator-harmony-dev-archive@incubator.apache.org Received: (qmail 19490 invoked by uid 500); 19 Oct 2006 10:06:31 -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 19479 invoked by uid 99); 19 Oct 2006 10:06:30 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 Oct 2006 03:06:30 -0700 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=DNS_FROM_RFC_ABUSE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of wuyuehao@gmail.com designates 66.249.82.235 as permitted sender) Received: from [66.249.82.235] (HELO wx-out-0506.google.com) (66.249.82.235) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 Oct 2006 03:06:29 -0700 Received: by wx-out-0506.google.com with SMTP id t15so573985wxc for ; Thu, 19 Oct 2006 03:06:08 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=T9rA3raj9E7GYVH6vn9QfK/4Zz6IsITNZVdIBaSJ7ToQPFfV0wwMKePopmUvETZShQ9c4SHhBeBs6efble50yXiXUChXDfxZ+9zCUd43wgJTpOQGm03FTBvutu+VGy1VFaSMVxQks8DTFrV88cDwSPnpp+HMaGK98Hy01hXVZCk= Received: by 10.70.129.2 with SMTP id b2mr17874292wxd; Thu, 19 Oct 2006 03:06:08 -0700 (PDT) Received: by 10.70.53.15 with HTTP; Thu, 19 Oct 2006 03:06:08 -0700 (PDT) Message-ID: <211709bc0610190306j47d2696eje9b083033b819e97@mail.gmail.com> Date: Thu, 19 Oct 2006 18:06:08 +0800 From: "Tony Wu" To: harmony-dev@incubator.apache.org Subject: Re: [classlib][kernel]A bug or non-bug difference? In-Reply-To: <4d0b24970610190301o3662619crc7a8c573e8f92b7e@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <211709bc0610190029s4f4671dg15c2cea35d2ecbf6@mail.gmail.com> <4d0b24970610190301o3662619crc7a8c573e8f92b7e@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hi all, please note that the Throwable is a kernel class. It comes with VME. On 10/19/06, Andrew Zhang wrote: > On 10/19/06, Tony Wu wrote: > > > > I've tried Log4j on Harmony and found there are many failures caused > > by one difference between RI and Harmony. The > > Throwable.printStackTrace(PrintWriter) calls the *println* method of > > PrinterWriter on RI whereas calls *print* twice(Obviously print > > msssage then print a line separator) on Harmony. It will cause > > different behavior when a user inherit the PrinterWriter and override > > these two methods. Shall we fix it or leave as an non-bug difference? > > > For this case, RI doesn't conflict with spec, and is reasonable, so I think > we'd better follow RI. Additionally, log4j has shown its dependency of this > feature! > > refer to testcase below, > > > > public class TestThrow { > > public static void main(String[] args) { > > MyWriter mw = new MyWriter(System.out); > > Throwable throwable = new Exception("Just Testing"); > > throwable.printStackTrace(mw); > > } > > } > > class MyWriter extends PrintWriter { > > public MyWriter(OutputStream out) { > > super(out); > > } > > > > public void print(String s) { > > System.out.println("print"); > > } > > > > public void println(String s) { > > System.out.println("println"); > > } > > } > > OUTPUTS: > > RI > > println > > HARMONY > > print > > print > > > > -- > > Tony Wu > > 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 > > > > > > > -- > Best regards, > Andrew Zhang > > -- Tony Wu 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