diff --git a/core-common/src/main/java/org/glassfish/jersey/internal/inject/ParamConverterConfigurator.java b/core-common/src/main/java/org/glassfish/jersey/internal/inject/ParamConverterConfigurator.java index c5eff7fb55..bbd644138a 100644 --- a/core-common/src/main/java/org/glassfish/jersey/internal/inject/ParamConverterConfigurator.java +++ b/core-common/src/main/java/org/glassfish/jersey/internal/inject/ParamConverterConfigurator.java @@ -31,8 +31,8 @@ public class ParamConverterConfigurator implements BootstrapConfigurator { @Override public void init(InjectionManager injectionManager, BootstrapBag bootstrapBag) { - InstanceBinding aggregatedConverters = - Bindings.service(new ParamConverters.AggregatedProvider(injectionManager)) + final ClassBinding aggregatedConverters = + Bindings.service(ParamConverters.AggregatedProvider.class) .to(ParamConverterProvider.class); injectionManager.register(aggregatedConverters); } diff --git a/core-common/src/main/java/org/glassfish/jersey/internal/inject/ParamConverters.java b/core-common/src/main/java/org/glassfish/jersey/internal/inject/ParamConverters.java index 144189b9f1..8fdfca9de0 100644 --- a/core-common/src/main/java/org/glassfish/jersey/internal/inject/ParamConverters.java +++ b/core-common/src/main/java/org/glassfish/jersey/internal/inject/ParamConverters.java @@ -264,7 +264,6 @@ public static class OptionalCustomProvider implements ParamConverterProvider { // Delegates to this provider when the type of Optional is extracted. private final InjectionManager manager; - @Inject public OptionalCustomProvider(InjectionManager manager) { this.manager = manager; } @@ -405,6 +404,7 @@ public static class AggregatedProvider implements ParamConverterProvider { /** * Create new aggregated {@link ParamConverterProvider param converter provider}. */ + @Inject public AggregatedProvider(InjectionManager manager) { this.providers = new ParamConverterProvider[] { // ordering is important (e.g. Date provider must be executed before String Constructor