For a bounded generic type (e.g. Point<T extends Serializable>), implementing a custom Serde as depicted in the micronaut-serialization documentation should allow serialization to work properly.
This has been the case with Micronaut version up to 4.3.5.
Actual Behaviour
After upgrading to 4.3.6+, we got following error with the same code base:
io.micronaut.serde.exceptions.SerdeException: No serializable introspection present for type Point.
Consider adding Serdeable. Serializable annotate to type Point.
Alternatively if you are not in control of the project's source code, you can use @SerdeImport(Point.class) to enable serialization of this type.
However, when the generic type is unbounded (e.g. change to Point<T> instead), the test passes.
It seems the behavior has changed since #742 in terms of matching generic argument types.
Expected Behavior
For a bounded generic type (e.g.
Point<T extends Serializable>
), implementing a custom Serde as depicted in the micronaut-serialization documentation should allow serialization to work properly. This has been the case with Micronaut version up to 4.3.5.Actual Behaviour
After upgrading to 4.3.6+, we got following error with the same code base:
However, when the generic type is unbounded (e.g. change to
Point<T>
instead), the test passes.It seems the behavior has changed since #742 in terms of matching generic argument types.
Steps To Reproduce
Please refer to the reproducer repo with steps: https://github.com/SpikeBlues/micronaut-serde-issue
Environment Information
./gradlew -v
Example Application
https://github.com/SpikeBlues/micronaut-serde-issue
Version
4.3.6