cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r683263 - /cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/interceptor/JAXRSInInterceptor.java
Date Wed, 06 Aug 2008 13:41:59 GMT
Author: dkulp
Date: Wed Aug  6 06:41:57 2008
New Revision: 683263

URL: http://svn.apache.org/viewvc?rev=683263&view=rev
Log:
[CXF-1730] Actually, if a ProviderInfo<RequestHandler> handles it, the ACCEPT_CONTENT_TYPES
wouldn't be set and NPE.

Modified:
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/interceptor/JAXRSInInterceptor.java

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/interceptor/JAXRSInInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/interceptor/JAXRSInInterceptor.java?rev=683263&r1=683262&r2=683263&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/interceptor/JAXRSInInterceptor.java
(original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/interceptor/JAXRSInInterceptor.java
Wed Aug  6 06:41:57 2008
@@ -108,6 +108,13 @@
             path = path + "/";
         }
         
+        String acceptTypes = (String)message.get(Message.ACCEPT_CONTENT_TYPE);
+        if (acceptTypes == null) {
+            acceptTypes = "*/*";
+        }
+        List<MediaType> acceptContentTypes = JAXRSUtils.sortMediaTypes(acceptTypes);
+        message.getExchange().put(Message.ACCEPT_CONTENT_TYPE, acceptContentTypes);
+        
         
         //1. Matching target resource class
         Service service = message.getExchange().get(Service.class);
@@ -134,13 +141,6 @@
             }
         }
         
-        String acceptTypes = (String)message.get(Message.ACCEPT_CONTENT_TYPE);
-        if (acceptTypes == null) {
-            acceptTypes = "*/*";
-        }
-        
-        List<MediaType> acceptContentTypes = JAXRSUtils.sortMediaTypes(acceptTypes);
-        message.getExchange().put(Message.ACCEPT_CONTENT_TYPE, acceptContentTypes);
         message.getExchange().put(ROOT_RESOURCE_CLASS, resource);
         
         LOG.fine("Request path is: " + path);



Mime
View raw message