private static void getAllTypesForResource(ClassResourceInfo resource,
ResourceTypes types,
boolean jaxbOnly,
MessageBodyWriter<?> jaxbWriter) {
for (OperationResourceInfo ori : resource.getMethodDispatcher().getOperationResourceInfos()) {
<BUG>Method method = ori.getMethodToInvoke();
Class<?> realReturnType = method.getReturnType();</BUG>
Class<?> cls = realReturnType;
if (cls == Response.class) {
cls = getActualJaxbType(cls, method, false);

private static void getAllTypesForResource(ClassResourceInfo resource,
ResourceTypes types,
boolean jaxbOnly,
MessageBodyWriter<?> jaxbWriter) {
for (OperationResourceInfo ori : resource.getMethodDispatcher().getOperationResourceInfos()) {
Method method = ori.getAnnotatedMethod() == null ? ori.getMethodToInvoke() : ori.getAnnotatedMethod();
Class<?> realReturnType = method.getReturnType();
Class<?> cls = realReturnType;
if (cls == Response.class) {
cls = getActualJaxbType(cls, method, false);
