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:07:21 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.0.x-fixes 7a02829e6 -> 9800ee0a5


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

Branch: refs/heads/3.0.x-fixes
Commit: 9800ee0a5cca34e422090520a5789723e6efd88a
Parents: 7a02829
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:06:59 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/9800ee0a/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