Return-Path: X-Original-To: apmail-cxf-commits-archive@www.apache.org Delivered-To: apmail-cxf-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 21E8317E6E for ; Thu, 15 Oct 2015 14:00:27 +0000 (UTC) Received: (qmail 93583 invoked by uid 500); 15 Oct 2015 14:00:20 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 93523 invoked by uid 500); 15 Oct 2015 14:00:20 -0000 Mailing-List: contact commits-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list commits@cxf.apache.org Received: (qmail 93514 invoked by uid 99); 15 Oct 2015 14:00:20 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Oct 2015 14:00:20 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id A79FDE10F4; Thu, 15 Oct 2015 14:00:20 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: sergeyb@apache.org To: commits@cxf.apache.org Message-Id: <525382daa7f34349a52efea984fef2bc@git.apache.org> X-Mailer: ASF-Git Admin Mailer 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 +0000 (UTC) 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 Authored: Thu Oct 15 15:00:05 2015 +0100 Committer: Sergey Beryozkin 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;