Skip to content
Permalink
Browse files

[FIXED JENKINS-26619] java.lang.Class#isAssignableFrom need to apply …

…on expected type

I always have to read javadoc twice to remember how to use it.
  • Loading branch information
ndeloof committed Feb 27, 2015
1 parent 80fe3b0 commit d438925a84bf0a16c50635a703526ddf26d6efd5
@@ -200,7 +200,9 @@ private static Object coerce(String context, Type type, @Nonnull Object o) throw

@SuppressWarnings("unchecked")
private static boolean isList(Type type) {
return type instanceof ParameterizedType && ((ParameterizedType) type).getRawType() instanceof Class && ((Class) ((ParameterizedType) type).getRawType()).isAssignableFrom(List.class);
return type instanceof ParameterizedType
&& ((ParameterizedType) type).getRawType() instanceof Class
&& List.class.isAssignableFrom((Class) ((ParameterizedType) type).getRawType());
}

private static List<Object> mapList(String context, Type type, List<?> list) throws Exception {

0 comments on commit d438925

Please sign in to comment.
You can’t perform that action at this time.