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 @@ -2238,8 +2238,17 @@ private static boolean isAssignable(final Type type,
22382238 // parameters of the target type.
22392239 if (fromResolved != null && !fromResolved .equals (toResolved ) && !(toResolved instanceof WildcardType
22402240 && isAssignable (fromResolved , toResolved , typeVarAssigns ))) {
2241+ // check for anys
22412242 if (fromResolved instanceof Any || toResolved instanceof Any )
22422243 continue ;
2244+ if (fromResolved instanceof ParameterizedType && Types .raw (fromResolved ) == Types .raw (toResolved )) {
2245+ Type [] fromTypes = ((ParameterizedType ) fromResolved ).getActualTypeArguments ();
2246+ Type [] toTypes = ((ParameterizedType ) toResolved ).getActualTypeArguments ();
2247+ for (int i = 0 ; i < fromTypes .length ; i ++) {
2248+ if (!(fromTypes [i ] instanceof Any || toTypes [i ] instanceof Any )) return false ;
2249+ }
2250+ continue ;
2251+ }
22432252 return false ;
22442253 }
22452254 }
You can’t perform that action at this time.
0 commit comments