-
Notifications
You must be signed in to change notification settings - Fork 3k
Closed
Labels
area/jacksonIssues related to Jackson (JSON library)Issues related to Jackson (JSON library)kind/bugSomething isn't workingSomething isn't working
Milestone
Description
Describe the bug
The weirdest issue and I do not understand why.
When reflection-free serialization is on I have a case where the object is not properly serialized the first time but if I reload the dev server it works the second time. In production it just did not work.
In our real code we can verify these issues:
- The 1st time we hit the endpoint the object is not correct / Reloading quarkus:dev then hitting the same endpoint the object is there
- If I instead move all the properties into the main object and do not extend it works fine.
- If I muck around with the JSON properties, remove
@JsonIgnoreand make them all@JsonPropertyit seems to work fine.
I was finally able to replicated it after I compared the bytecode and then added the "list" endpoint so that it matched our scenario.
Expected behavior
Serialization works the same when reflection-free is enabled for simple POJOs
Actual behavior
Various issues but the children object happens to be missing in this case.
Reloading quarkus:dev and hitting the same URL works the 2nd time.
How to Reproduce?
Scenario 1:
- mvn clean install
- In the "rest" project run
mvn quarkus:dev - Navigate to http://localhost:8080/hello - no child objects
- Reload quarkus:dev (press S)
- Navigate to http://localhost:8080/hello - child object is there
Scenario 2:
- Comment out the "list" endpoint
- In the "rest" project run
mvn quarkus:dev - Navigate to http://localhost:8080/hello - child object is there
Output of uname -a or ver
No response
Output of java -version
No response
Quarkus version or git rev
3.18.2
Build tool (ie. output of mvnw --version or gradlew --version)
Maven
Additional information
No response
Metadata
Metadata
Assignees
Labels
area/jacksonIssues related to Jackson (JSON library)Issues related to Jackson (JSON library)kind/bugSomething isn't workingSomething isn't working