mirror of
https://github.com/corda/corda.git
synced 2025-01-07 13:38:47 +00:00
allow java.lang.Object with no virtual methods, which may occur due to code shrinking
This commit is contained in:
parent
c9714c73f2
commit
125fe3440e
@ -1347,6 +1347,7 @@ parseMethodTable(Thread* t, Stream& s, object class_, object pool)
|
|||||||
if (declaredVirtualCount == 0
|
if (declaredVirtualCount == 0
|
||||||
and (classFlags(t, class_) & ACC_INTERFACE) == 0)
|
and (classFlags(t, class_) & ACC_INTERFACE) == 0)
|
||||||
{
|
{
|
||||||
|
if (classSuper(t, class_)) {
|
||||||
// inherit virtual table from superclass
|
// inherit virtual table from superclass
|
||||||
set(t, class_, ClassVirtualTable, superVirtualTable);
|
set(t, class_, ClassVirtualTable, superVirtualTable);
|
||||||
|
|
||||||
@ -1358,6 +1359,12 @@ parseMethodTable(Thread* t, Stream& s, object class_, object pool)
|
|||||||
set(t, class_, ClassInterfaceTable,
|
set(t, class_, ClassInterfaceTable,
|
||||||
classInterfaceTable(t, classSuper(t, class_)));
|
classInterfaceTable(t, classSuper(t, class_)));
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
// apparently Object does not have any virtual methods. We give
|
||||||
|
// it a vtable anyway so code doesn't break elsewhere.
|
||||||
|
object vtable = makeArray(t, 0, false);
|
||||||
|
set(t, class_, ClassVirtualTable, vtable);
|
||||||
|
}
|
||||||
} else if (virtualCount) {
|
} else if (virtualCount) {
|
||||||
// generate class vtable
|
// generate class vtable
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user