You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using newer Micronaut versions (4.7.4 at the time of writing) and @Serdeable.Deserializable(as = com.google.common.collect.ImmutableList), Micronaut should deserialize it without errors.
With the following versions, it works well:
micronaut-parent 4.6.2
micronaut.version set to 4.6.5
Actual Behaviour
When using @Serdeable.Deserializable(as = com.google.common.collect.ImmutableList), Micronaut throws an exception:
Error decoding HTTP response body: No bean introspection available for type [class com.google.common.collect.ImmutableList]. Ensure the class is annotated with io.micronaut.core.annotation.Introspected.
This happens at least with the following versions (not sure when the bug was introduced):
micronaut-parent 4.7.4
micronaut.version set to 4.7.4
Steps To Reproduce
I attached an example app, but if you want to do it manually:
Create a new Micronaut project with HTTP client, Guava and WireMock (or a similar one)
Create a DTO and add collection field to it. Annotate it with @Serdeable.Deserializable(as = ...), for example @Serdeable.Deserializable(as = com.google.common.collect.ImmutableList)
Create an HTTP client with a method that has the previously created DTO as return type
Create a test, use WireMock (or a similar one) to stub the HTTP response and write a simple assert (e.g., assert that the collection is empty)
When you run it, you'll get the exception.
Now, change the Micronaut parent and Micronaut Core versions to 4.6.2 and 4.6.5, respectively. Clean-compile and re-run the test, and this time it will pass.
I tried setting <micronaut.core.version>4.7.12</micronaut.core.version>, but the bug keeps happening.
Expected Behavior
When using newer Micronaut versions (4.7.4 at the time of writing) and
@Serdeable.Deserializable(as = com.google.common.collect.ImmutableList)
, Micronaut should deserialize it without errors.With the following versions, it works well:
Actual Behaviour
When using
@Serdeable.Deserializable(as = com.google.common.collect.ImmutableList)
, Micronaut throws an exception:Error decoding HTTP response body: No bean introspection available for type [class com.google.common.collect.ImmutableList]. Ensure the class is annotated with io.micronaut.core.annotation.Introspected
.This happens at least with the following versions (not sure when the bug was introduced):
Steps To Reproduce
I attached an example app, but if you want to do it manually:
@Serdeable.Deserializable(as = ...)
, for example@Serdeable.Deserializable(as = com.google.common.collect.ImmutableList)
Now, change the Micronaut parent and Micronaut Core versions to 4.6.2 and 4.6.5, respectively. Clean-compile and re-run the test, and this time it will pass.
I tried setting
<micronaut.core.version>4.7.12</micronaut.core.version>
, but the bug keeps happening.It might be related to #11538
Let me know if more information is required. Thanks!
Environment Information
Example Application
https://github.com/Nahuel92/poc-projects/tree/master/micronaut/micronaut-serdeable-deserializable-bug
Version
4.7.4
The text was updated successfully, but these errors were encountered: