serializer
serializer copied to clipboard
Some issues de/serializing certain types. e.g. EnumSet, Exceptions and Records
Environment Details
- Eclipse Serializer Version: 1.0.0
- JDK version: 17.0.7
- OS: Windows 10
Describe the bug
Hello! I stumbled across your de/serialization framework, which looks great! As we are just in the middle of transitioning away from hessian, I thought to give it a try. :) We have created a little testsuite to check if serialization works for us and a few things seem to be not working, so I wanted to ask if these are bugs or if I need to configure something or if there is any other way around the issues.
- exceptions: org.eclipse.serializer.persistence.exceptions.PersistenceExceptionTypeNotPersistable: Type not persistable: "class java.lang.Exception". Is there a way to enable exceptions?
- EnumSet: java.lang.NullPointerException: Cannot load from object array because "this.this$0.universe" is null
- BitSet: does not seem to be properly de/serialized (Expected :{135}, Actual :{})
- ImmutableList: e.g. List.of(1) -> Expected :[1] Actual :[1, java.lang.Object@69d2e517] some strange object in the list?
- ImmutableSet: like above, but with Set.of(1)
- de/serializing an object that has transient fields which are initialized like e.g. private transient ReentrantReadWriteLock rwLock = new ReentrantReadWriteLock(); private transient WriteLock wLock = rwLock.writeLock(); private transient ReadLock rLock = rwLock.readLock(); the fields remain null. -> nullreference in later code
- When trying to de/serialize records, I get Could not obtain access to "jdk.internal.misc.Unsafe", please start the VM with --add-exports java.base/jdk.internal.misc=ALL-UNNAMED
Regards, Raphael