Skip to content

Commit ce1a5ec

Browse files
committed
Better generics
1 parent 30fe836 commit ce1a5ec

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/main/java/org/apache/commons/cli/TypeHandler.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public class TypeHandler {
4747
* The Class type parameter matches the Converter's first generic type.
4848
* </p>
4949
*/
50-
private static Map<Class<?>, Converter<?, ?>> converterMap = new HashMap<>();
50+
private static Map<Class<?>, Converter<?, ? extends Throwable>> converterMap = new HashMap<>();
5151

5252
static {
5353
resetConverters();
@@ -239,7 +239,7 @@ public static FileInputStream openFile(final String string) throws ParseExceptio
239239
* @param converter The Converter to associate with Class. May be null.
240240
* @since 1.7.0
241241
*/
242-
public static void register(final Class<?> clazz, final Converter<?, ?> converter) {
242+
public static void register(final Class<?> clazz, final Converter<?, ? extends Throwable> converter) {
243243
if (converter == null) {
244244
converterMap.remove(clazz);
245245
} else {

0 commit comments

Comments
 (0)