mirror of
https://github.com/corda/corda.git
synced 2025-01-06 05:04:20 +00:00
set InvocationTargetException target
When using the OpenJDK classpath, the target exception and the Throwable cause are two different fields; we must set them both.
This commit is contained in:
parent
81d7786716
commit
b4c3eea0f1
@ -11,6 +11,8 @@
|
||||
package java.lang.reflect;
|
||||
|
||||
public class InvocationTargetException extends Exception {
|
||||
private Throwable target; // for compatibility with OpenJDK
|
||||
|
||||
public InvocationTargetException(Throwable targetException, String message) {
|
||||
super(message, targetException);
|
||||
}
|
||||
|
@ -561,6 +561,9 @@ invoke(Thread* t, object method, object instance, object args)
|
||||
object exception = t->exception;
|
||||
t->exception = makeThrowable
|
||||
(t, Machine::InvocationTargetExceptionType, 0, 0, exception);
|
||||
|
||||
set(t, t->exception, InvocationTargetExceptionTarget,
|
||||
throwableCause(t, t->exception));
|
||||
}
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user