Checking for TypeVariable, patch from Evaristo Wychoski Benfatti applied, This closes
@@ -29,6 +29,7 @@ import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.lang.reflect.Type;
+import java.lang.reflect.TypeVariable;
import java.net.URI;
import java.net.URL;
import java.util.ArrayList;
@@ -1074,7 +1075,8 @@ public class WadlGenerator implements ContainerRequestFilter {
} else {
theActualType = ResourceUtils.getActualJaxbType(type, opMethod, inbound);
}
- if (theActualType == Object.class && !(genericType instanceof Class)) {
+ if (theActualType == Object.class && !(genericType instanceof Class)
+ || genericType instanceof TypeVariable) {
Type theType = InjectionUtils.processGenericTypeIfNeeded(
ori.getClassResourceInfo().getServiceClass(), Object.class, genericType);
theActualType = InjectionUtils.getActualType(theType);
