snowdrop-zen / quarkus

Quarkus: Supersonic Subatomic Java.
https://quarkus.io
Apache License 2.0
1 stars 0 forks source link

Resteasy reactive - Handling Generics in request body #330

Closed snowdrop-bot closed 3 years ago

snowdrop-bot commented 3 years ago

Describe the bug

Generics arguments are not getting mapped properly from request and throwing the below exception

java.lang.ClassCastException: class java.util.HashMap cannot be cast to class org.generictype.Item 
        (java.util.HashMap is in module java.base of loader 'bootstrap'; org.generictype.Item is in unnamed module of loader 
        io.quarkus.bootstrap.classloading.QuarkusClassLoader @1e1e0d04)

Quarkus version: 1.13.3.Final Zulip discussion: Discussion

To Reproduce

Reproducer link: https://github.com/aravindtga/Quarkus-generic-request-body-jsonb

Steps to reproduce the behavior:

  1. Run the provided application
  2. Hit the endpoint "/endpoint" with the request body
    {
    "content": {
        "name":"firstname",
        "email":"myemail"
    }
    }

https://github.com/quarkusio/quarkus/issues/16905


$upstream:16905$