cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject cxf git commit: Make sure stream is closed (and file unlocked) if exception is thrown
Date Fri, 09 Oct 2015 16:33:50 GMT
Repository: cxf
Updated Branches:
  refs/heads/master 55eb0b9b7 -> f2daa2f1c


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

Branch: refs/heads/master
Commit: f2daa2f1cc6b701d90166235aad1e71a05d646b6
Parents: 55eb0b9
Author: Daniel Kulp <dkulp@apache.org>
Authored: Fri Oct 9 10:50:32 2015 -0400
Committer: Daniel Kulp <dkulp@apache.org>
Committed: Fri Oct 9 12:33:37 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/f2daa2f1/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 ea18a54..23acfe5 100644
--- a/core/src/main/java/org/apache/cxf/io/CachedWriter.java
+++ b/core/src/main/java/org/apache/cxf/io/CachedWriter.java
@@ -605,6 +605,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