@@ -844,7 +844,7 @@ private static boolean satisfiesRawTypes(final Type arg, final Type param) {
844844 final List <Class <?>> destClasses = Types .raws (param );
845845 for (final Class <?> destClass : destClasses ) {
846846 final Optional <Class <?>> first = srcClasses .stream ().filter (
847- srcClass -> destClass . isAssignableFrom (srcClass )).findFirst ();
847+ srcClass -> Types . isAssignable (srcClass , destClass )).findFirst ();
848848 if (!first .isPresent ()) {
849849 // TODO can we remove this?
850850// throw new IllegalArgumentException("Argument #" + i + //
@@ -979,12 +979,12 @@ private static boolean satisfiesWildcardType(final Type arg,
979979 for (final Type upperBound : upperBounds ) {
980980 // check that the argument can satisfy the parameter
981981 final Class <?> upperType = Types .raw (upperBound );
982- if (! upperType . isAssignableFrom (argType )) return false ;
982+ if (! Types . isAssignable (argType , upperType )) return false ;
983983 }
984984 for (final Type lowerBound : lowerBounds ) {
985985 final Class <?> lowerType = Types .raw (lowerBound );
986986 // check that the argument can satisfy the parameter
987- if (! argType . isAssignableFrom (lowerType )) return false ;
987+ if (! Types . isAssignable (lowerType , argType )) return false ;
988988 }
989989
990990 return true ;
@@ -1020,8 +1020,7 @@ else if (paramComponent instanceof TypeVariable) {
10201020 // something other than a ParameterizedType or a TypeVariable.
10211021 final Class <?> argClass = Types .raw (argComponent );
10221022 final Class <?> paramClass = Types .raw (paramComponent );
1023- if (!paramClass .isAssignableFrom (argClass )) return false ;
1024- return true ;
1023+ return Types .isAssignable (argClass , paramClass );
10251024 }
10261025
10271026 /**
0 commit comments