cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1309739 - in /cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs: model/AbstractResourceInfo.java utils/ResourceUtils.java
Date Thu, 05 Apr 2012 10:29:43 GMT
Author: sergeyb
Date: Thu Apr  5 10:29:43 2012
New Revision: 1309739

URL: http://svn.apache.org/viewvc?rev=1309739&view=rev
Log:
[CXF-4179] Remove checks for well-known context class names as it won't work with custom contexts

Modified:
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/AbstractResourceInfo.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/ResourceUtils.java

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/AbstractResourceInfo.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/AbstractResourceInfo.java?rev=1309739&r1=1309738&r2=1309739&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/AbstractResourceInfo.java
(original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/AbstractResourceInfo.java
Thu Apr  5 10:29:43 2012
@@ -125,8 +125,7 @@ public abstract class AbstractResourceIn
     
     private void checkContextMethod(Method m) {
         Class<?> type = m.getParameterTypes()[0];
-        if (AnnotationUtils.isContextClass(type)
-            && m.getName().equals("set" + type.getSimpleName())) {        
+        if (m.getName().equals("set" + type.getSimpleName())) {        
             addContextMethod(type, m);
         }
     }

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/ResourceUtils.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/ResourceUtils.java?rev=1309739&r1=1309738&r2=1309739&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/ResourceUtils.java
(original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/ResourceUtils.java
Thu Apr  5 10:29:43 2012
@@ -246,8 +246,7 @@ public final class ResourceUtils {
             boolean match = true;
             for (int i = 0; i < params.length; i++) {
                 if (!perRequest) { 
-                    if (AnnotationUtils.getAnnotation(anns[i], Context.class) == null
-                        || !AnnotationUtils.isContextClass(params[i])) {
+                    if (AnnotationUtils.getAnnotation(anns[i], Context.class) == null) {
                         match = false;
                         break;
                     }
@@ -562,7 +561,7 @@ public final class ResourceUtils {
             : (MultivaluedMap<String, String>)m.get(URITemplate.TEMPLATE_PARAMETERS);
         Object[] values = new Object[params.length];
         for (int i = 0; i < params.length; i++) {
-            if (AnnotationUtils.isContextClass(params[i])) {
+            if (AnnotationUtils.getAnnotation(anns[i], Context.class) != null) {
                 values[i] = JAXRSUtils.createContextValue(m, genericTypes[i], params[i]);
             } else {
                 Parameter p = ResourceUtils.getParameter(i, anns[i], params[i]);



Mime
View raw message