[Java] Use ReflectionUtils.getCtrHandle() in ExternalizableSerializer#1044
Conversation
When deserializing an `Externalizable` object, it may be necessary to call `setAccessible(true)` on its constructor first, as the class may be declared as non-public in another package.
java/fury-core/src/main/java/io/fury/serializer/ExternalizableSerializer.java
Outdated
Show resolved
Hide resolved
java/fury-core/src/test/java/io/fury/serializer/ExternalizableSerializerTest.java
Outdated
Show resolved
Hide resolved
setAccessible(true) on Externalizable constructorReflectionUtils.getCtrHandle() in ExternalizableSerializer
java/fury-core/src/test/java/io/fury/serializer/ExternalizableSerializerTest.java
Outdated
Show resolved
Hide resolved
java/fury-core/src/main/java/io/fury/serializer/ExternalizableSerializer.java
Outdated
Show resolved
Hide resolved
…Serializer.java Co-authored-by: Shawn <shawn.ck.yang@gmail.com>
|
@chaokunyang I think to support the combination of |
|
|
@chaokunyang Thanks for merging this fix! I hope that I will soon be able to successfully serialize and deserialize our object graphs. Do you want me to create a separate issue for the combination of |
|
Here it is in any case: #1045 |
|
@knutwannheden Thanks for creating new issue, I'll fix it soon |
When deserializing an
Externalizableobject, it may end up throwing an exception, as the class may be declared as non-public in another package and thus isn't accessible from the serializer. Fix this by using theReflectionUtils.getCtrHandle()utility.