File tree Expand file tree Collapse file tree
src/main/java/org/scijava/util Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -864,16 +864,13 @@ private static boolean satisfiesParameterizedTypes(final Type arg,
864864 final Type [] destTypes = param .getActualTypeArguments ();
865865
866866 // get an array of the source argument types
867- // TODO: Verify that this is correct. getExactSuperType should always return a ParameterizedType here because
868- // param is parameterized and we know (check done earlier) that arg is assignable to param. Hence, arg must have
869- // type parameters for param?
867+ Type argType = arg ;
868+ if (arg instanceof Class ) {
869+ argType = parameterizeRaw ((Class <?>) arg );
870+ }
870871 ParameterizedType parameterizedSuperType = (ParameterizedType ) GenericTypeReflector
871- .getExactSuperType (arg , Types .raw (param ));
872+ .getExactSuperType (argType , Types .raw (param ));
872873 final Type [] srcTypes = parameterizedSuperType .getActualTypeArguments ();
873- // final Type[] srcTypes = new Type[destTypes.length];
874- // for (int i = 0; i < srcTypes.length; i++) {
875- // srcTypes[i] = Types.param(arg, Types.raw(arg), i);
876- // }
877874
878875 // check to see if any of the Types of this ParameterizedType are
879876 // TypeVariables, if so restrict them to the type parameter of the argument.
You can’t perform that action at this time.
0 commit comments