mirror of
https://github.com/corda/corda.git
synced 2025-01-21 03:55:00 +00:00
perform any necessary argument conversion in JVM_NewInstanceFromConstructor
We must use the same utility function as JVM_InvokeMethod to ensure that primitive arguments are unboxed when necessary.
This commit is contained in:
parent
4b0bbd85e8
commit
4a69496ab4
@ -4671,19 +4671,7 @@ jvmNewInstanceFromConstructor(Thread* t, uintptr_t* arguments)
|
||||
(t, jclassVmClass(t, jconstructorClazz(t, *constructor))),
|
||||
jconstructorSlot(t, *constructor));
|
||||
|
||||
THREAD_RESOURCE0(t, {
|
||||
if (t->exception) {
|
||||
object exception = t->exception;
|
||||
t->exception = makeThrowable
|
||||
(t, Machine::InvocationTargetExceptionType, 0, 0, exception);
|
||||
}
|
||||
});
|
||||
|
||||
if (args) {
|
||||
t->m->processor->invokeArray(t, method, instance, *args);
|
||||
} else {
|
||||
t->m->processor->invoke(t, method, instance);
|
||||
}
|
||||
invoke(t, method, instance, args ? *args : 0);
|
||||
|
||||
return reinterpret_cast<uint64_t>(makeLocalReference(t, instance));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user