Skip to content

When testing request payload is populated with string "null" if enable-reflection-free-serializers enabled #44300

@kjq

Description

@kjq

Describe the bug

3.15.1 works but in 3.16.1 our tests fail when enable-reflection-free-serializers enabled.

What happens is it populates null String values with the string "null" instead of leaving it null.

It seems to work fine when running and just happens in tests. It also does not seem to happen in every test because similar tests do no exhibit the issue.

Expected behavior

Null values are left null and not populated with a string "null"

Actual behavior

String values at least are populated with "null" (as a string) instead of being left null

How to Reproduce?

  1. Run mvn install -DskipTest
  2. Set a breakpoint on the "resource" method hello
  3. Debug using the test case - the "request" will have null string values populated with "null"

Image

  1. Set quarkus.rest.jackson.optimization.enable-reflection-free-serializers=false
  2. Repeat steps 2 & 3 above
  3. The body is correct

Image

code-with-quarkus.zip

Output of uname -a or ver

No response

Output of java -version

No response

Quarkus version or git rev

3.16.1

Build tool (ie. output of mvnw --version or gradlew --version)

Maven

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/jacksonIssues related to Jackson (JSON library)kind/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions