cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject cxf git commit: Few more updates to JAXRSOutInterceptor to avoid RuntimeDelegate path
Date Wed, 08 Jul 2015 10:02:00 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.0.x-fixes 2c2a1971e -> 60c6f80ae


Few more updates to JAXRSOutInterceptor to avoid RuntimeDelegate path


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

Branch: refs/heads/3.0.x-fixes
Commit: 60c6f80ae221b724ef49eae0ea5f8b79d3dc2c20
Parents: 2c2a197
Author: Sergey Beryozkin <sberyozkin@talend.com>
Authored: Wed Jul 8 10:54:54 2015 +0100
Committer: Sergey Beryozkin <sberyozkin@talend.com>
Committed: Wed Jul 8 11:01:38 2015 +0100

----------------------------------------------------------------------
 .../org/apache/cxf/jaxrs/interceptor/JAXRSOutInterceptor.java  | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/60c6f80a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/interceptor/JAXRSOutInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/interceptor/JAXRSOutInterceptor.java
b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/interceptor/JAXRSOutInterceptor.java
index 73e8d96..bf0f7ec 100644
--- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/interceptor/JAXRSOutInterceptor.java
+++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/interceptor/JAXRSOutInterceptor.java
@@ -34,7 +34,6 @@ import java.util.logging.Logger;
 
 import javax.servlet.http.HttpServletResponse;
 import javax.ws.rs.HttpMethod;
-import javax.ws.rs.NotAcceptableException;
 import javax.ws.rs.Produces;
 import javax.ws.rs.core.HttpHeaders;
 import javax.ws.rs.core.MediaType;
@@ -55,6 +54,7 @@ import org.apache.cxf.jaxrs.impl.WriterInterceptorMBW;
 import org.apache.cxf.jaxrs.model.OperationResourceInfo;
 import org.apache.cxf.jaxrs.provider.AbstractConfigurableProvider;
 import org.apache.cxf.jaxrs.provider.ServerProviderFactory;
+import org.apache.cxf.jaxrs.utils.ExceptionUtils;
 import org.apache.cxf.jaxrs.utils.HttpUtils;
 import org.apache.cxf.jaxrs.utils.InjectionUtils;
 import org.apache.cxf.jaxrs.utils.JAXRSUtils;
@@ -108,7 +108,7 @@ public class JAXRSOutInterceptor extends AbstractOutDatabindingInterceptor
{
             }
         } else {
             int status = getStatus(message, responseObj != null ? 200 : 204);
-            response = Response.status(status).entity(responseObj).build();
+            response = JAXRSUtils.toResponseBuilder(status).entity(responseObj).build();
         }
         
         Exchange exchange = message.getExchange();
@@ -406,7 +406,7 @@ public class JAXRSOutInterceptor extends AbstractOutDatabindingInterceptor
{
             if ("application".equals(mt.getType()) || mt.isWildcardType()) {
                 mt = MediaType.APPLICATION_OCTET_STREAM_TYPE;
             } else {
-                throw new NotAcceptableException();
+                throw ExceptionUtils.toNotAcceptableException(null,  null);
             }
         }
         return mt;


Mime
View raw message