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:14:25 GMT
Repository: cxf
Updated Branches:
  refs/heads/2.7.x-fixes b6b5831b1 -> 016ea7cac


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/016ea7ca
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/016ea7ca
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/016ea7ca

Branch: refs/heads/2.7.x-fixes
Commit: 016ea7cac70e0d53480be2f8e207e2c506f3b18e
Parents: b6b5831
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:14:04 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/016ea7ca/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 60257cf..ecb6818 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.InternalServerErrorException;
 import javax.ws.rs.Produces;
 import javax.ws.rs.container.AsyncResponse;
 import javax.ws.rs.core.HttpHeaders;
@@ -61,6 +60,7 @@ import org.apache.cxf.jaxrs.model.OperationResourceInfo;
 import org.apache.cxf.jaxrs.model.ProviderInfo;
 import org.apache.cxf.jaxrs.provider.AbstractConfigurableProvider;
 import org.apache.cxf.jaxrs.provider.ProviderFactory;
+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;
@@ -136,7 +136,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();
@@ -397,7 +397,7 @@ public class JAXRSOutInterceptor extends AbstractOutDatabindingInterceptor
{
         }
         if (excResponse == null) {
             setResponseStatus(message, 500);
-            throw new InternalServerErrorException(ex);
+            throw ExceptionUtils.toInternalServerErrorException(ex,  null);
         } else {
             serializeMessage(pf, message, excResponse, null, false);
         } 


Mime
View raw message