cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject git commit: [CXF-5612] Logging a warning if JAX-RS method has no Path or HTTP method annotations
Date Fri, 14 Mar 2014 10:22:02 GMT
Repository: cxf
Updated Branches:
  refs/heads/master fdfc50e48 -> 1ec43095d


[CXF-5612] Logging a warning if JAX-RS method has no Path or HTTP method annotations


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

Branch: refs/heads/master
Commit: 1ec43095d4577dea6ba76d5a4085a07de8bfae92
Parents: fdfc50e
Author: Sergey Beryozkin <sberyozkin@talend.com>
Authored: Fri Mar 14 10:21:45 2014 +0000
Committer: Sergey Beryozkin <sberyozkin@talend.com>
Committed: Fri Mar 14 10:21:45 2014 +0000

----------------------------------------------------------------------
 .../main/java/org/apache/cxf/jaxrs/utils/AnnotationUtils.java | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/1ec43095/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/AnnotationUtils.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/AnnotationUtils.java
b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/AnnotationUtils.java
index 137bbb1..345fa7c 100644
--- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/AnnotationUtils.java
+++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/AnnotationUtils.java
@@ -25,6 +25,7 @@ import java.util.Collections;
 import java.util.HashSet;
 import java.util.LinkedHashSet;
 import java.util.Set;
+import java.util.logging.Logger;
 
 import javax.annotation.Priority;
 import javax.ws.rs.BeanParam;
@@ -43,8 +44,10 @@ import javax.ws.rs.Produces;
 import javax.ws.rs.QueryParam;
 import javax.ws.rs.core.Context;
 
-public final class AnnotationUtils {
+import org.apache.cxf.common.logging.LogUtils;
 
+public final class AnnotationUtils {
+    private static final Logger LOG = LogUtils.getL7dLogger(AnnotationUtils.class);
     private static final Set<Class<?>> PARAM_ANNOTATION_CLASSES;
     private static final Set<Class<?>> METHOD_ANNOTATION_CLASSES;
     static {
@@ -166,6 +169,8 @@ public final class AnnotationUtils {
         }
         for (Annotation[] paramAnnotations : m.getParameterAnnotations()) {
             if (isValidParamAnnotations(paramAnnotations)) {
+                LOG.warning("Method " + m.getName() + " in " + m.getDeclaringClass().getName()
+                             + " has no JAX-RS Path or HTTP Method annotations");
                 return m;
             }
         }


Mime
View raw message