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 4a1ca86401..ca6facab42 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 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2023 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2024 Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2018 Payara Foundation and/or its affiliates. * * This program and the accompanying materials are made available under the @@ -121,7 +121,7 @@ public String toString(final T value) throws IllegalArgumentException { @Singleton public static class StringConstructor extends ParamConverterCompliance implements ParamConverterProvider { - private StringConstructor(boolean canReturnNull) { + protected StringConstructor(boolean canReturnNull) { super(canReturnNull); } @@ -150,7 +150,7 @@ protected T _fromString(final String value) throws Exception { @Singleton public static class TypeValueOf extends ParamConverterCompliance implements ParamConverterProvider { - private TypeValueOf(boolean canReturnNull) { + protected TypeValueOf(boolean canReturnNull) { super(canReturnNull); } @@ -178,7 +178,7 @@ public T _fromString(final String value) throws Exception { @Singleton public static class TypeFromString extends ParamConverterCompliance implements ParamConverterProvider { - private TypeFromString(boolean canReturnNull) { + protected TypeFromString(boolean canReturnNull) { super(canReturnNull); } @@ -206,7 +206,7 @@ public T _fromString(final String value) throws Exception { @Singleton public static class TypeFromStringEnum extends TypeFromString { - private TypeFromStringEnum(boolean canReturnNull) { + protected TypeFromStringEnum(boolean canReturnNull) { super(canReturnNull); } @@ -221,7 +221,7 @@ public ParamConverter getConverter(final Class rawType, @Singleton public static class CharacterProvider extends ParamConverterCompliance implements ParamConverterProvider { - private CharacterProvider(boolean canReturnNull) { + protected CharacterProvider(boolean canReturnNull) { super(canReturnNull); } @@ -266,7 +266,7 @@ public String toString(T value) { @Singleton public static class DateProvider extends ParamConverterCompliance implements ParamConverterProvider { - private DateProvider(boolean canReturnNull) { + protected DateProvider(boolean canReturnNull) { super(canReturnNull); } @@ -309,7 +309,7 @@ public static class OptionalCustomProvider extends ParamConverterCompliance impl // Delegates to this provider when the type of Optional is extracted. private final InjectionManager manager; - public OptionalCustomProvider(InjectionManager manager, boolean canReturnNull) { + protected OptionalCustomProvider(InjectionManager manager, boolean canReturnNull) { super(canReturnNull); this.manager = manager; } @@ -365,6 +365,8 @@ public String toString(T value) throws IllegalArgumentException { @Singleton public static class OptionalProvider implements ParamConverterProvider { + protected OptionalProvider() {} + @Override public ParamConverter getConverter(Class rawType, Type genericType, Annotation[] annotations) { final Optionals optionals = Optionals.getOptional(rawType);