EvanYao826 opened a new pull request, #16274: URL: https://github.com/apache/dubbo/pull/16274
Fixes #16270 --- ## Problem When a generic Map does not carry a `"class"` entry, the target type comes from the method signature. The existing Serializable check was only applied when a `"class"` key was present, allowing non-Serializable DTOs to slip through when the key was absent. ## Fix Add a check in `PojoUtils.realize()` that rejects non-Serializable types even when the Map has no `"class"` key. This makes the behavior consistent with the existing check that fires when the key is present. ## Changes - `PojoUtils.java`: Added Serializable interface check before the enum handling block - `PojoUtilsTest.java`: Added `NonSerializableDto` test class and `test_realize_rejectsNonSerializableMapWithoutClassKey` test --- *AI-agent involvement: This contribution was assisted by an AI coding agent.* -- 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]
