uuuyuqi commented on PR #16198: URL: https://github.com/apache/dubbo/pull/16198#issuecomment-4222118656
@zrlw Thanks for the suggestion! I've added a test case with `NarrowNumberPojo` that has `byte age`, `short height`, `float salary` fields, plus `List<Byte> scores` and `Map<String, Byte> attributes` fields. The test (`testReadObjectWithGenericType_pojoWithNarrowNumberFields`) verifies that: - Primitive narrow number fields (`byte`, `short`, `float`) are deserialized correctly - `List<Byte>` and `Map<String, Byte>` fields inside the POJO are also deserialized correctly - The fix does not affect POJO deserialization in any way This is expected because when the method parameter is a POJO (e.g., `processPerson(Person person)`), `genericParameterTypes[i]` equals `pts[i]` (both are `Person.class`), so the code falls through to the original `readObject(Class)` path — POJO fields are handled by hessian2's `JavaDeserializer` which already reads field type info from the class definition. All 16 tests pass locally. -- 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]
