Open porechajp opened 6 months ago
looks like a bug in micronaut-serde. Try to use io.micronaut:micronaut-jackson-databind
instead io.micronaut.serde:micronaut-serde-jackson
. If all will be ok, then bug in micronaut-serialization
@altro3 yes, micronaut-jackson-databind is working fine.
Expected Behavior
For the following record,
and controller
The getAll method (called on HTTP GET /api/employees) should return a single element array of following,
Actual Behaviour
Starting 4.3.0, the same method is failing with following exception,
and on client side following is received,
After some debugging, I concluded that this has probably got introduced due to commit : (Make NettyJsonHandler implement NettyBodyWriter)
Due to this change, the wrap method of RoutingInBoundHandler ,
started returning the same instance (as it now inherits from NettyBodyWriter) instead of CompatNettyWriteClosure.
I debugged this flow in 4.2.4 and 4.3.2 and in case of 4.2.4, since it creates CompatNettyWriteClosure, it ultimately results in to correct interpretation of Argument type in StreamSerializer's createSpecific method.
So in case of 4.2.4, Argument instance comes pointing to Stream,
whereas in case of 4.3.2, it points to Head,
Looks like unintentional effect.
If my understanding is incorrect, please let me know.
Steps To Reproduce
No response
Environment Information
Micronaut version 4.3.2 Oracle JDK 21 Windows 11
Example Application
No response
Version
4.3.2