You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I had searched in the issues and found no similar issues.
Version
main branch
Component(s)
Java
Minimal reproduce step
In org.apache.fury.serializer.AbstractObjectSerializer, we added transient fields for copy too. But not all fields are copyable. For example, we may have a transient field such as a Lock, it's will introduce subtle bugs if we copy such objects.
What did you expect to see?
We should copy non-transient and non-static fields only, and follow object serialization semantics.
AbstractObjectSerializer needs to change and all serializers which extends AbstractObjectSerializer needs to change to. We still need to following object serialization process, just skip writing data to buffer
## What does this PR do?
Adjusting the deep copy of ReplaceResolveSerializer.
obj -> writeReplace -> copy -> readResolve -> newObj
<!-- Describe the purpose of this PR. -->
## Related issues
#1849
<!--
Is there any related issue? Please attach here.
- #xxxx0
- #xxxx1
- #xxxx2
-->
## Does this PR introduce any user-facing change?
<!--
If any user-facing interface changes, please [open an
issue](https://github.com/apache/fury/issues/new/choose) describing the
need to do so and update the document if necessary.
-->
- [ ] Does this PR introduce any public API change?
- [ ] Does this PR introduce any binary protocol compatibility change?
## Benchmark
<!--
When the PR has an impact on performance (if you don't know whether the
PR will have an impact on performance, you can submit the PR first, and
if it will have impact on performance, the code reviewer will explain
it), be sure to attach a benchmark data here.
-->
Search before asking
Version
main branch
Component(s)
Java
Minimal reproduce step
In
org.apache.fury.serializer.AbstractObjectSerializer
, we added transient fields for copy too. But not all fields are copyable. For example, we may have a transient field such as a Lock, it's will introduce subtle bugs if we copy such objects.What did you expect to see?
We should copy non-transient and non-static fields only, and follow object serialization semantics.
AbstractObjectSerializer
needs to change and all serializers which extendsAbstractObjectSerializer
needs to change to. We still need to following object serialization process, just skip writing data to bufferWhat did you see instead?
transient fields are copied too.
Anything Else?
#1701
#1739
Are you willing to submit a PR?
The text was updated successfully, but these errors were encountered: