Skip to content

Commit

Permalink
Fix reflections registration of constructors used in serialization
Browse files Browse the repository at this point in the history
Closes: #19711
  • Loading branch information
zakkak committed Sep 15, 2021
1 parent 3913fd0 commit 6f8b1e0
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -567,8 +567,6 @@ private MethodDescriptor createRegisterSerializationForClassMethod(ClassCreator
greaterThan21_3.loadNull(), registerArgs);
greaterThan21_3.returnValue(null);

ResultHandle objectClass = tc.invokeStaticMethod(forNameMethodDescriptor, tc.load("java.lang.Object"),
tc.load(false), tccl);
ResultHandle serializationRegistryClass = tc.invokeStaticMethod(forNameMethodDescriptor,
tc.load("com.oracle.svm.core.jdk.serialize.SerializationRegistry"),
tc.load(false), tccl);
Expand Down Expand Up @@ -670,7 +668,7 @@ private MethodDescriptor createRegisterSerializationForClassMethod(ClassCreator
serializationSupport, clazz, newSerializationConstructorClass, accessor);
ResultHandle addReflectionsArgs2 = tc.newArray(Class.class, tc.load(2));
tc.writeArrayValue(addReflectionsArgs2, 0, clazz);
tc.writeArrayValue(addReflectionsArgs2, 1, objectClass);
tc.writeArrayValue(addReflectionsArgs2, 1, newSerializationConstructorClass);
tc.invokeVirtualMethod(invokeMethodDescriptor, addReflectionsLookupMethod, tc.loadNull(), addReflectionsArgs2);

addSerializationForClass.returnValue(null);
Expand Down

0 comments on commit 6f8b1e0

Please sign in to comment.