mirror of
https://github.com/corda/corda.git
synced 2025-06-13 04:38:19 +00:00
fix exception wrapping for Method.invoke and static initializers
Method.invoke should initialize its class before invoking the method, throwing an ExceptionInInitializerError if it fails, without wrapping said error in an InvocationTargetException. Also, we must initialize ExceptionInInitializerError.exception when throwing instances from the VM, since OpenJDK's ExceptionInInitializerError.getCause uses the exception field, not the cause field.
This commit is contained in:
@ -11,11 +11,11 @@
|
||||
package java.lang;
|
||||
|
||||
public class ExceptionInInitializerError extends Error {
|
||||
private final Throwable cause2;
|
||||
private final Throwable exception;
|
||||
|
||||
public ExceptionInInitializerError(String message) {
|
||||
super(message);
|
||||
cause2 = null;
|
||||
exception = null;
|
||||
}
|
||||
|
||||
public ExceptionInInitializerError() {
|
||||
|
Reference in New Issue
Block a user