mirror of
https://github.com/corda/corda.git
synced 2025-01-07 13:38:47 +00:00
throw IllegalArgumentException in JVM_InvokeMethod on type mismatch
This commit is contained in:
parent
49d8ccb1bd
commit
73547db737
@ -4674,6 +4674,10 @@ jvmInvokeMethod(Thread* t, uintptr_t* arguments)
|
||||
(t, jclassVmClass(t, jmethodClazz(t, *method))),
|
||||
jmethodSlot(t, *method));
|
||||
|
||||
if (instance and not instanceOf(t, methodClass(t, vmMethod), *instance)) {
|
||||
throwNew(t, Machine::IllegalArgumentExceptionType);
|
||||
}
|
||||
|
||||
return reinterpret_cast<uint64_t>
|
||||
(makeLocalReference
|
||||
(t, invoke
|
||||
|
Loading…
Reference in New Issue
Block a user