Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
Sola-ris opened this issue Jan 13, 2025 · 4 comments · Fixed by #45593
Closed
Labels
area/rest kind/bug Something isn't working
Milestone

Comments

@Sola-ris
Copy link
Contributor

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.

@Sola-ris Sola-ris added the kind/bug Something isn't working label Jan 13, 2025
Copy link

quarkus-bot bot commented Jan 13, 2025

/cc @FroMage (rest), @geoand (rest), @radcortez (config), @stuartwdouglas (rest)

@geoand
Copy link
Contributor

geoand commented Jan 14, 2025

Nice catch!

Would you like to contribute a fix?

@Sola-ris
Copy link
Contributor Author

Sure!

I'll send a PR later today.

@geoand
Copy link
Contributor

geoand commented Jan 14, 2025

🙏🏽

Sola-ris added a commit to Sola-ris/quarkus that referenced this issue Jan 14, 2025
Sola-ris added a commit to Sola-ris/quarkus that referenced this issue Jan 14, 2025
@quarkus-bot quarkus-bot bot added this to the 3.18 - main milestone Jan 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/rest kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants