cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject [1/3] cxf git commit: Make sure stream is closed (and file unlocked) if exception is thrown
Date Mon, 12 Oct 2015 19:29:13 GMT
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 <dkulp@apache.org>
Authored: Fri Oct 9 10:50:32 2015 -0400
Committer: Daniel Kulp <dkulp@apache.org>
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()) {


Mime
View raw message