This is an automated email from the ASF dual-hosted git repository.

dkulp pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cxf.git

commit 60e02bacfcb09ff105d083ac3f49d0cd03c21494
Author: Daniel Kulp <dk...@apache.org>
AuthorDate: Wed Mar 21 12:41:01 2018 -0400

    [CXF-7670] Consider the non-synthetic/bridge methods first, then 
re-consider the bridge/synthetics if needed
---
 .../org/apache/cxf/jaxrs/utils/ResourceUtils.java  | 24 +++++++++++++++-------
 1 file changed, 17 insertions(+), 7 deletions(-)

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 0f044e8..62ead3b 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
@@ -314,14 +314,24 @@ public final class ResourceUtils {
         final Set<Method> annotatedMethods = new HashSet<>();
 
         for (Method m : serviceClass.getMethods()) {
-
-            Method annotatedMethod = 
AnnotationUtils.getAnnotatedMethod(serviceClass, m);
-
-            if (!annotatedMethods.contains(annotatedMethod)) {
-                evaluateResourceMethod(cri, enableStatic, md, m, 
annotatedMethod);
-                annotatedMethods.add(annotatedMethod);
+            if (!m.isBridge() && !m.isSynthetic()) {
+                //do real methods first
+                Method annotatedMethod = 
AnnotationUtils.getAnnotatedMethod(serviceClass, m);
+                if (!annotatedMethods.contains(annotatedMethod)) {
+                    evaluateResourceMethod(cri, enableStatic, md, m, 
annotatedMethod);
+                    annotatedMethods.add(annotatedMethod);
+                }
+            }
+        }
+        for (Method m : serviceClass.getMethods()) {
+            if (m.isBridge() || m.isSynthetic()) {
+                //if a bridge/synthetic method isn't already mapped to 
something, go ahead and do it
+                Method annotatedMethod = 
AnnotationUtils.getAnnotatedMethod(serviceClass, m);
+                if (!annotatedMethods.contains(annotatedMethod)) {
+                    evaluateResourceMethod(cri, enableStatic, md, m, 
annotatedMethod);
+                    annotatedMethods.add(annotatedMethod);
+                }
             }
-
         }
         cri.setMethodDispatcher(md);
     }

-- 
To stop receiving notification emails like this one, please contact
dk...@apache.org.

Reply via email to