chaokunyang commented on issue #3673:
URL: https://github.com/apache/fory/issues/3673#issuecomment-4435616680

   ```java
       public static record SomeDataU(long unboxedLong) {
       }
   
       public static record SomeDataB(Long boxedLong) {
       }
   
       public static void main(String... args) throws IOException {
           var fory1 = Fory.builder()
               .withLanguage(Language.JAVA)
               .requireClassRegistration(true)
               .withCompatible(true)
               .build();
           fory1.register(SomeDataU.class);
           var fory2 = Fory.builder()
               .withLanguage(Language.JAVA)
               .requireClassRegistration(true)
               .withCompatible(true)
               .build();
           fory2.register(SomeDataB.class);
   
           // works fine
           fory.deserialize(fory.serialize(new SomeDataU(100L)));
           // throws an exception
           fory2.deserialize(fory1.serialize(new SomeDataB(100L)));
       }
   ```


-- 
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