cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject cxf git commit: [CXF-6642] Making sure TL storage is cleaned up when Response.readEntity is called directly
Date Thu, 15 Oct 2015 14:00:20 GMT
Repository: cxf
Updated Branches:
  refs/heads/master 6d6302720 -> 0430e7756


[CXF-6642] Making sure TL storage is cleaned up when Response.readEntity is called directly


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

Branch: refs/heads/master
Commit: 0430e7756e89e6402ec6a59256523725e81aba88
Parents: 6d63027
Author: Sergey Beryozkin <sberyozkin@gmail.com>
Authored: Thu Oct 15 15:00:05 2015 +0100
Committer: Sergey Beryozkin <sberyozkin@gmail.com>
Committed: Thu Oct 15 15:00:05 2015 +0100

----------------------------------------------------------------------
 .../src/main/java/org/apache/cxf/jaxrs/impl/ResponseImpl.java   | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/0430e775/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ResponseImpl.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ResponseImpl.java b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ResponseImpl.java
index 681142a..f172737 100644
--- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ResponseImpl.java
+++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ResponseImpl.java
@@ -376,6 +376,11 @@ public final class ResponseImpl extends Response {
             } catch (Exception ex) {
                 autoClose(cls, true);
                 reportMessageHandlerProblem("MSG_READER_PROBLEM", cls, mediaType, ex);
+            } finally {
+                ProviderFactory pf = ProviderFactory.getInstance(outMessage);
+                if (pf != null) {
+                    pf.clearThreadLocalProxies();
+                }
             }
         } else if (entity != null && cls.isAssignableFrom(entity.getClass())) {
             lastEntity = entity;


Mime
View raw message