gitlab #224
Change-Id: I3f3decead033c62726c5919b2b3f36b786de5135
public static <T> Class<T> getSingleParameterTypeExtending(Class<?> clazz) {
Type t = clazz.getGenericSuperclass();
+ while (t instanceof Class<?>) {
+ Class<?> cl = (Class) t;
+ t = cl.getGenericSuperclass();
+ if (t == null) {
+ // according to javadoc, we have reached java.lang.Object so no can do
+ break;
+ }
+ }
if(t instanceof Class<?>) {
throw new UnsupportedOperationException("Missing parameter type for input class '" + clazz.getCanonicalName() + "'");
} else if (t instanceof ParameterizedType) {