mirror of
https://github.com/corda/corda.git
synced 2025-01-23 04:48:09 +00:00
return null for non-array classes in JVM_GetComponentType
This commit is contained in:
parent
0922dd3429
commit
023e1d93d5
@ -3500,6 +3500,7 @@ jvmGetComponentType(Thread* t, uintptr_t* arguments)
|
||||
{
|
||||
jclass c = reinterpret_cast<jobject>(arguments[0]);
|
||||
|
||||
if (classArrayDimensions(t, jclassVmClass(t, *c))) {
|
||||
uint8_t n = byteArrayBody(t, className(t, jclassVmClass(t, *c)), 1);
|
||||
if (n != 'L' and n != '[') {
|
||||
return reinterpret_cast<uintptr_t>
|
||||
@ -3509,6 +3510,9 @@ jvmGetComponentType(Thread* t, uintptr_t* arguments)
|
||||
(makeLocalReference
|
||||
(t, getJClass(t, classStaticTable(t, jclassVmClass(t, *c)))));
|
||||
}
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
extern "C" JNIEXPORT jclass JNICALL
|
||||
|
Loading…
Reference in New Issue
Block a user