mirror of
https://github.com/corda/corda.git
synced 2025-01-09 06:23:04 +00:00
return null from JNIEnv::GetSuperclass for interfaces per spec
This commit is contained in:
parent
23ea8f7d76
commit
1d4c9d32fb
@ -2378,10 +2378,13 @@ extern "C" JNIEXPORT int64_t JNICALL
|
|||||||
Avian_java_lang_Class_getSuperclass
|
Avian_java_lang_Class_getSuperclass
|
||||||
(Thread* t, object, uintptr_t* arguments)
|
(Thread* t, object, uintptr_t* arguments)
|
||||||
{
|
{
|
||||||
object super = classSuper
|
object class_ = jclassVmClass(t, reinterpret_cast<object>(arguments[0]));
|
||||||
(t, jclassVmClass(t, reinterpret_cast<object>(arguments[0])));
|
if (classFlags(t, class_) & ACC_INTERFACE) {
|
||||||
|
return 0;
|
||||||
return super ? reinterpret_cast<int64_t>(getJClass(t, super)) : 0;
|
} else {
|
||||||
|
object super = classSuper(t, class_);
|
||||||
|
return super ? reinterpret_cast<int64_t>(getJClass(t, super)) : 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C" JNIEXPORT void
|
extern "C" JNIEXPORT void
|
||||||
|
@ -431,12 +431,14 @@ GetObjectClass(Thread* t, jobject o)
|
|||||||
uint64_t
|
uint64_t
|
||||||
getSuperclass(Thread* t, uintptr_t* arguments)
|
getSuperclass(Thread* t, uintptr_t* arguments)
|
||||||
{
|
{
|
||||||
jclass c = reinterpret_cast<jclass>(arguments[0]);
|
object class_ = jclassVmClass(t, *reinterpret_cast<jclass>(arguments[0]));
|
||||||
|
if (classFlags(t, class_) & ACC_INTERFACE) {
|
||||||
object super = classSuper(t, jclassVmClass(t, *c));
|
return 0;
|
||||||
|
} else {
|
||||||
return super ? reinterpret_cast<uint64_t>
|
object super = classSuper(t, class_);
|
||||||
(makeLocalReference(t, getJClass(t, super))) : 0;
|
return super ? reinterpret_cast<uint64_t>
|
||||||
|
(makeLocalReference(t, getJClass(t, super))) : 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
jclass JNICALL
|
jclass JNICALL
|
||||||
|
Loading…
Reference in New Issue
Block a user