harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Geir Magnusson Jr." <g...@pobox.com>
Subject Re: [classlib][kernel]A bug or non-bug difference?
Date Fri, 20 Oct 2006 04:09:03 GMT


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?

are you kidding? :)

Major app (log4j) is failing - we go with the "bug" in the RI.

geir

> 
> 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
> 

---------------------------------------------------------------------
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


Mime
View raw message