mirror of
https://github.com/corda/corda.git
synced 2025-01-07 13:38:47 +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
|
||||
(Thread* t, object, uintptr_t* arguments)
|
||||
{
|
||||
object super = classSuper
|
||||
(t, jclassVmClass(t, reinterpret_cast<object>(arguments[0])));
|
||||
|
||||
return super ? reinterpret_cast<int64_t>(getJClass(t, super)) : 0;
|
||||
object class_ = jclassVmClass(t, reinterpret_cast<object>(arguments[0]));
|
||||
if (classFlags(t, class_) & ACC_INTERFACE) {
|
||||
return 0;
|
||||
} else {
|
||||
object super = classSuper(t, class_);
|
||||
return super ? reinterpret_cast<int64_t>(getJClass(t, super)) : 0;
|
||||
}
|
||||
}
|
||||
|
||||
extern "C" JNIEXPORT void
|
||||
|
@ -431,12 +431,14 @@ GetObjectClass(Thread* t, jobject o)
|
||||
uint64_t
|
||||
getSuperclass(Thread* t, uintptr_t* arguments)
|
||||
{
|
||||
jclass c = reinterpret_cast<jclass>(arguments[0]);
|
||||
|
||||
object super = classSuper(t, jclassVmClass(t, *c));
|
||||
|
||||
return super ? reinterpret_cast<uint64_t>
|
||||
(makeLocalReference(t, getJClass(t, super))) : 0;
|
||||
object class_ = jclassVmClass(t, *reinterpret_cast<jclass>(arguments[0]));
|
||||
if (classFlags(t, class_) & ACC_INTERFACE) {
|
||||
return 0;
|
||||
} else {
|
||||
object super = classSuper(t, class_);
|
||||
return super ? reinterpret_cast<uint64_t>
|
||||
(makeLocalReference(t, getJClass(t, super))) : 0;
|
||||
}
|
||||
}
|
||||
|
||||
jclass JNICALL
|
||||
|
Loading…
Reference in New Issue
Block a user