Skip to content

Commit

Permalink
Use the shared JsonProvider when creating Jsonb instance
Browse files Browse the repository at this point in the history
No need to create a second one.
  • Loading branch information
gsmet committed Sep 7, 2024
1 parent 613cdf3 commit 909e24d
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

import io.quarkus.arc.All;
import io.quarkus.arc.DefaultBean;
import io.quarkus.jsonp.JsonProviderHolder;

@Singleton
public class JsonbProducer {
Expand All @@ -30,6 +31,6 @@ public JsonbConfig jsonbConfig(@All List<JsonbConfigCustomizer> customizers) {
@Singleton
@DefaultBean
public Jsonb jsonb(JsonbConfig jsonbConfig) {
return JsonbBuilder.create(jsonbConfig);
return JsonbBuilder.newBuilder().withProvider(JsonProviderHolder.jsonProvider()).withConfig(jsonbConfig).build();
}
}

0 comments on commit 909e24d

Please sign in to comment.