jim-parsons commented on issue #2941:
URL: https://github.com/apache/fory/issues/2941#issuecomment-3650689527

   > > I have no plans to introduce another type dispatch mechnisim for copy, 
it will use same Serializer dispatch system
   > > We could defer the exception to runtime. Instead of raise exception when 
get serializer, we could return a Serializer for any types. But for types which 
don't support serialization, we throw exception real serialization happens.
   > 
   > I don't understand about Fory enough to tell what is meant by dispatch 
here. My big question if they are using similar/same code why is serialize 
succeed when copy fails? Does that have anything to do with transient fields? 
Does copy copies transient fields?
   > 
   > I think I can more meaningfully comment based on my use cases if I 
understand the difference between copy and serializae and why one succeed and 
one don't.
   
   After some debug work, here is what i've found;
   
   The goal of serialize/deserialize will ignore the `transient` field, but 
`copy` won`t , because the `copy` function need to calculate all the field 
value , which currently with `fory#serialize` function. 
   
   So in this case, when copy filed `protected transient FastSessionServices 
fastSessionServices;` it failed, because it has unsupport serialize filed 
`ClassLoader`
   
   <img width="930" height="116" alt="Image" 
src="https://github.com/user-attachments/assets/3139cd6d-ffc0-4756-a77f-a48abca41949";
 />
   
   
   The serialize class wont handle `transient` field
   
   <img width="1049" height="449" alt="Image" 
src="https://github.com/user-attachments/assets/1c76f134-37fb-42ea-befe-12b57823540f";
 />


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to