- 
                Notifications
    You must be signed in to change notification settings 
- Fork 3k
Description
Describe the bug
I have an application, with several endpoints. First of them returns POJO class, and the second one accepts the same POJO as input. In both cases POJO is (de)serialized to/from JSON. The first one is called from REST client (in the same app), which makes the result accessible on the third endpoint.
When I enable the new reflection-free (de)serialization, client endpoint returns json with one of the fields set to null. This doesn't happen, when I remove  the second endpoint.
Expected behavior
REST client should never lose data
Actual behavior
Original data:
{"author":"Heller","title":"Catch-22"}
Data, copied by REST client:
{"author":null,"title":"Catch-22"}
How to Reproduce?
- git clone -b client-serialize-field-null [email protected]:fedinskiy/reproducer.git & cd reproducer
- mvn clean verifyThis fails
- mvn clean verify -Dquarkus.rest.jackson.optimization.enable-reflection-free-serializers=falseThe old version succeeds
- If method sequelis removed from filesrc/main/java/io/quarkus/qe/GreetingResource.java, the test succeeds
If we compare these two versions (with and without sequel method), we can find difference in generated classes:
- mvn clean package -DskipTests -Dquarkus.package.jar.decompiler.enabled=true
- ls target/decompiler/generated-bytecode/io/quarkus/qe/ | grep quarkusjackson
 The failing version contains deserializer class:
Book$quarkusjacksondeserializer.java
Book$quarkusjacksonserializer.java
SerializedStrings$quarkusjacksonserializer.java
and the working one doesn't
Book$quarkusjacksonserializer.java
SerializedStrings$quarkusjacksonserializer.java
Output of uname -a or ver
6.12.15-200.fc41.x86_64
Output of java -version
21.0.5, vendor: Eclipse Adoptium
Quarkus version or git rev
3.18.4
Build tool (ie. output of mvnw --version or gradlew --version)
Apache Maven 3.9.6 (bc0240f3c744dd6b6ec2920b3cd08dcc295161ae)
Additional information
No response