cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject [2/2] cxf git commit: [CXF-6849] making sure the annotated method is preferred
Date Thu, 31 Mar 2016 16:52:01 GMT
[CXF-6849] making sure the annotated method is preferred


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/239cb5d1
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/239cb5d1
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/239cb5d1

Branch: refs/heads/3.1.x-fixes
Commit: 239cb5d1a54fd7f5d3036f4e3679948c46c185dc
Parents: 36d2bf6
Author: Sergey Beryozkin <sberyozkin@gmail.com>
Authored: Thu Mar 31 17:50:32 2016 +0100
Committer: Sergey Beryozkin <sberyozkin@gmail.com>
Committed: Thu Mar 31 17:51:43 2016 +0100

----------------------------------------------------------------------
 .../src/main/java/org/apache/cxf/jaxrs/utils/ResourceUtils.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/239cb5d1/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/ResourceUtils.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/ResourceUtils.java
b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/ResourceUtils.java
index dc370ea..92fdf1a 100644
--- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/ResourceUtils.java
+++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/ResourceUtils.java
@@ -590,7 +590,7 @@ public final class ResourceUtils {
                                                boolean jaxbOnly,
                                                MessageBodyWriter<?> jaxbWriter) {
         for (OperationResourceInfo ori : resource.getMethodDispatcher().getOperationResourceInfos())
{
-            Method method = ori.getMethodToInvoke();
+            Method method = ori.getAnnotatedMethod() == null ? ori.getMethodToInvoke() :
ori.getAnnotatedMethod();
             Class<?> realReturnType = method.getReturnType();
             Class<?> cls = realReturnType;
             if (cls == Response.class) {


Mime
View raw message