Hi Alexei

On 10/19/06, Alexei Zakharov <[EMAIL PROTECTED]> wrote:
Hi,

Does it really fail? Or some not-very-important testcase fails?

Some testcases of Log4j assume that printStackTrace(PrintWriter) will
use the println of its parameter. It overides the println but
unfortunately Harmony use the print rather than println.


Thanks,

2006/10/19, Mikhail Fursov <[EMAIL PROTECTED]>:
> IMHO if Log4J fails we have no chances to keep our behavour and must follow
> RI here.
>
> On 10/19/06, Tony Wu <[EMAIL PROTECTED]> 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?
> >
> > 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

--
Alexei Zakharov,
Intel Enterprise Solutions Software Division

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
Tony Wu
China Software Development Lab, IBM

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to