Skip to content
This repository has been archived by the owner on Dec 15, 2021. It is now read-only.

Commit

Permalink
[FIXED JENKINS-26619] java.lang.Class#isAssignableFrom need to apply …
Browse files Browse the repository at this point in the history
…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 d438925
Showing 1 changed file with 3 additions and 1 deletion.
Expand Up @@ -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 {
Expand Down

0 comments on commit d438925

Please sign in to comment.