Skip to content

RESTEasy Reactive: ClientBuilder and Client should not share the same Configuration instance #45555

@Sola-ris

Description

@Sola-ris

Describe the bug

When creating a Client from a ClientBuilder, the Configuration is passed to the resulting Client instead of copied, so all properties and providers registered on the client are visible to the builder and all other clients build from it.

For comparison, when going from a Client to a WebTarget, the Configuration is copied.

Expected behavior

Each Client should receive a copy of the Configuration of the ClientBuilder.

Actual behavior

The Client and ClientBuilder share the same Configuration instance.

How to Reproduce?

Reproducer: https://github.com/Sola-ris/quarkus-configuration-reporducer

Run via ./mvnw verify

Output of uname -a or ver

Linux xxx 5.15.167.4-microsoft-standard-WSL2 #1 SMP Tue Nov 5 00:21:55 UTC 2024 x86_64 GNU/Linux

Output of java -version

openjdk version "21.0.5" 2024-10-15 LTS OpenJDK Runtime Environment Temurin-21.0.5+11 (build 21.0.5+11-LTS) OpenJDK 64-Bit Server VM Temurin-21.0.5+11 (build 21.0.5+11-LTS, mixed mode, sharing)

Quarkus version or git rev

3.17.6

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

Apache Maven 3.9.9 (8e8579a9e76f7d015ee5ec7bfcdc97d260186937)

Additional information

When replacing the reproducer's dependencies with their RESTEasy Classic versions, the test passes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions