Skip to content

Commit 320d4bf

Browse files
Treiblesschorlegselzer
authored andcommitted
WIP: Add type variables instead of wildcards
1 parent f031382 commit 320d4bf

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

src/main/java/org/scijava/util/Types.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -702,7 +702,6 @@ public static Type component(final Type type) {
702702
* </pre>
703703
*/
704704
public static Type fieldType(final Field field, final Class<?> type) {
705-
final Type wildType = GenericTypeReflector.addWildcardParameters(type);
706705
final Type pType = parameterizeRaw(type);
707706
return GenericTypeReflector.getExactFieldType(field, pType);
708707
}
@@ -714,8 +713,8 @@ public static Type fieldType(final Field field, final Class<?> type) {
714713
public static Type methodReturnType(final Method method,
715714
final Class<?> type)
716715
{
717-
final Type wildType = GenericTypeReflector.addWildcardParameters(type);
718-
return GenericTypeReflector.getExactReturnType(method, wildType);
716+
final Type pType = parameterizeRaw(type);
717+
return GenericTypeReflector.getExactReturnType(method, pType);
719718
}
720719

721720
/**
@@ -725,8 +724,8 @@ public static Type methodReturnType(final Method method,
725724
public static Type[] methodParamTypes(final Method method,
726725
final Class<?> type)
727726
{
728-
final Type wildType = GenericTypeReflector.addWildcardParameters(type);
729-
return GenericTypeReflector.getExactParameterTypes(method, wildType);
727+
final Type pType = parameterizeRaw(type);
728+
return GenericTypeReflector.getExactParameterTypes(method, pType);
730729
}
731730

732731
/**

0 commit comments

Comments
 (0)