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 AF67F18D56 for ; Mon, 12 Oct 2015 19:29:36 +0000 (UTC) Received: (qmail 23779 invoked by uid 500); 12 Oct 2015 19:29:14 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 23719 invoked by uid 500); 12 Oct 2015 19:29:14 -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 23709 invoked by uid 99); 12 Oct 2015 19:29:14 -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; Mon, 12 Oct 2015 19:29:14 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 17750E04B3; Mon, 12 Oct 2015 19:29:13 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: dkulp@apache.org To: commits@cxf.apache.org Date: Mon, 12 Oct 2015 19:29:13 -0000 Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: [1/3] cxf git commit: Make sure stream is closed (and file unlocked) if exception is thrown Repository: cxf Updated Branches: refs/heads/3.0.x-fixes d117a9502 -> 75cae0f76 Make sure stream is closed (and file unlocked) if exception is thrown Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/e061ffab Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/e061ffab Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/e061ffab Branch: refs/heads/3.0.x-fixes Commit: e061ffaba9b0642536642de146e1071cfb088e47 Parents: d117a95 Author: Daniel Kulp Authored: Fri Oct 9 10:50:32 2015 -0400 Committer: Daniel Kulp Committed: Mon Oct 12 15:28:50 2015 -0400 ---------------------------------------------------------------------- core/src/main/java/org/apache/cxf/io/CachedWriter.java | 1 + 1 file changed, 1 insertion(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cxf/blob/e061ffab/core/src/main/java/org/apache/cxf/io/CachedWriter.java ---------------------------------------------------------------------- diff --git a/core/src/main/java/org/apache/cxf/io/CachedWriter.java b/core/src/main/java/org/apache/cxf/io/CachedWriter.java index 3444c05..25e35b7 100644 --- a/core/src/main/java/org/apache/cxf/io/CachedWriter.java +++ b/core/src/main/java/org/apache/cxf/io/CachedWriter.java @@ -628,6 +628,7 @@ public class CachedWriter extends Writer { ciphers = new CipherPair(cipherTransformation); } } catch (GeneralSecurityException e) { + out.close(); throw new IOException(e.getMessage(), e); } out = new CipherOutputStream(out, ciphers.getEncryptor()) {