sparklyupdog opened a new issue, #3678: URL: https://github.com/apache/fory/issues/3678
### Search before asking - [x] I had searched in the [issues](https://github.com/apache/fory/issues) and found no similar issues. ### Version 0.17.0 0.16.0 ### Component(s) Java ### Minimal reproduce step Here's the code ```java public static record SomeDataU(long unboxedLong) { } public static record SomeDataB(Long boxedLong) { } public static void main(String... args) throws IOException { var fory = Fory.builder() .withLanguage(Language.JAVA) .requireClassRegistration(true) .build(); fory.register(SomeDataU.class); fory.register(SomeDataB.class); // works fine fory.deserialize(fory.serialize(new SomeDataU(100L))); // throws an exception fory.deserialize(fory.serialize(new SomeDataB(100L))); } ``` Deserialization of the second object always fails. If the object is simple like this, it would be IndexOutOfBoundsException, if it is big enough to resize underlying memory buffer, it will fail later because buffer reader position for some reason does not advance after reading Long field, which breaks all other fields. ### What did you expect to see? Deserialization does not throws an exception ### What did you see instead? best case is IndexOutOfBoundsException during deserialization, worst case is obscure errors around deserialized objects ### Anything Else? refer to #3673, none of the solutions did work, yet the issue was eagerly closed, please make sure your suggestions do work before closing also: tried downgrading to 0.16.0 and switching jre to no avail ### Are you willing to submit a PR? - [ ] I'm willing to submit a PR! -- 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]
