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


_______________________________________________ Classpath-patches mailing list [email protected] http://lists.gnu.org/mailman/listinfo/classpath-patches

Reply via email to