Skip to content

Commit dcc78e9

Browse files
committed
[GR-65575] Handle linkage errors in SerializationBuilder#superHasAccessibleConstructor.
PullRequest: graal/21017
2 parents e82557f + 2414ddc commit dcc78e9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/reflect/serialize/SerializationFeature.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -655,7 +655,11 @@ private Constructor<?> getConstructorForSerialization(Class<?> cl) {
655655
}
656656

657657
private boolean superHasAccessibleConstructor(Class<?> prev) {
658-
return ReflectionUtil.invokeMethod(superHasAccessibleConstructor, ReflectionFactory.getReflectionFactory(), prev);
658+
try {
659+
return ReflectionUtil.invokeMethod(superHasAccessibleConstructor, ReflectionFactory.getReflectionFactory(), prev);
660+
} catch (LinkageError le) {
661+
return false;
662+
}
659663
}
660664

661665
private boolean disableSerialConstructorChecks() {

0 commit comments

Comments
 (0)