This is an automated email from the ASF dual-hosted git repository.

siano pushed a commit to branch camel-2.24.x
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/camel-2.24.x by this push:
     new f22a3e9  CAMEL-14072 FileInputStreamCache does not delete file if file 
system is full
f22a3e9 is described below

commit f22a3e99a286ab88cef9575e9d5ac4f9e4a338c1
Author: Stephan Siano <stephan.si...@sap.com>
AuthorDate: Wed Oct 16 13:03:32 2019 +0200

    CAMEL-14072 FileInputStreamCache does not delete file if file system is full
    
    Thanks to André Weickel for reporting and proposed fix
---
 .../apache/camel/converter/stream/FileInputStreamCache.java    | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git 
a/camel-core/src/main/java/org/apache/camel/converter/stream/FileInputStreamCache.java
 
b/camel-core/src/main/java/org/apache/camel/converter/stream/FileInputStreamCache.java
index f778c99..8e38495 100644
--- 
a/camel-core/src/main/java/org/apache/camel/converter/stream/FileInputStreamCache.java
+++ 
b/camel-core/src/main/java/org/apache/camel/converter/stream/FileInputStreamCache.java
@@ -202,14 +202,14 @@ public final class FileInputStreamCache extends 
InputStream implements StreamCac
                                 if (outputStream != null) {
                                     outputStream.close();
                                 }
-                                try {
-                                    cleanUpTempFile();
-                                } catch (Exception e) {
-                                    LOG.warn("Error deleting temporary cache 
file: " + tempFile + ". This exception will be ignored.", e);
-                                }
                             } catch (Exception e) {
                                 LOG.warn("Error closing streams. This 
exception will be ignored.", e);
                             }
+                            try {
+                                cleanUpTempFile();
+                            } catch (Exception e) {
+                                LOG.warn("Error deleting temporary cache file: 
" + tempFile + ". This exception will be ignored.", e);
+                            }
                         }
                     }
 

Reply via email to