[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cp-patches] Small Throwable patch
From: |
Archie Cobbs |
Subject: |
Re: [cp-patches] Small Throwable patch |
Date: |
Sat, 19 Feb 2005 09:51:16 -0600 |
User-agent: |
Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.3) Gecko/20041129 |
Michael Koch wrote:
* java/lang/Throwable.java: simplify initializing cause in constructor
I think it would be best to test the behavior of latest SUN JDK and then
act on this. If it calles initCause() we need to do this too. If not we
should not too.
JDK 1.4.2 does not call initCause from the constructor. Here's
my test program (it prints nothing):
public class temp extends Throwable {
public temp(String s, Throwable cause) {
super(s, cause);
}
public Throwable initCause(Throwable cause) {
System.out.println("initCause(" + cause + ")");
return super.initCause(cause);
}
public static void main(String[] args) {
temp t = new temp("test", new Exception());
}
}
-Archie
__________________________________________________________________________
Archie Cobbs * CTO, Awarix * http://www.awarix.com