You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2015/07/31 11:45:19 UTC

[1/2] camel git commit: CAMEL-8241: Better stream closed check to ignore case. Thanks to Brian O'Keefe for the suggestion.

Repository: camel
Updated Branches:
  refs/heads/camel-2.15.x a7d295860 -> 18d7bfca7
  refs/heads/master 5dfa412b4 -> 6a62f9ae2


CAMEL-8241: Better stream closed check to ignore case. Thanks to Brian O'Keefe for the suggestion.


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/6a62f9ae
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/6a62f9ae
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/6a62f9ae

Branch: refs/heads/master
Commit: 6a62f9ae2bbc4bc66ba29da10d40887beff064a9
Parents: 5dfa412
Author: Claus Ibsen <da...@apache.org>
Authored: Fri Jul 31 11:50:35 2015 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Fri Jul 31 11:50:35 2015 +0200

----------------------------------------------------------------------
 .../camel/component/exec/impl/DefaultExecCommandExecutor.java     | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/6a62f9ae/components/camel-exec/src/main/java/org/apache/camel/component/exec/impl/DefaultExecCommandExecutor.java
----------------------------------------------------------------------
diff --git a/components/camel-exec/src/main/java/org/apache/camel/component/exec/impl/DefaultExecCommandExecutor.java b/components/camel-exec/src/main/java/org/apache/camel/component/exec/impl/DefaultExecCommandExecutor.java
index 9011231..b2ed60e 100644
--- a/components/camel-exec/src/main/java/org/apache/camel/component/exec/impl/DefaultExecCommandExecutor.java
+++ b/components/camel-exec/src/main/java/org/apache/camel/component/exec/impl/DefaultExecCommandExecutor.java
@@ -22,6 +22,7 @@ import java.io.File;
 import java.io.IOException;
 import java.io.InputStream;
 import java.util.List;
+import java.util.Locale;
 
 import org.apache.camel.component.exec.ExecCommand;
 import org.apache.camel.component.exec.ExecCommandExecutor;
@@ -79,7 +80,7 @@ public class DefaultExecCommandExecutor implements ExecCommandExecutor {
         } catch (IOException ioe) {
             // workaround to ignore if the stream was already closes due some race condition in commons-exec
             String msg = ioe.getMessage();
-            if ("Stream closed".equals(msg)) {
+            if (msg != null && "stream closed".equals(msg.toLowerCase(Locale.ENGLISH))) {
                 LOG.debug("Ignoring Stream closed IOException", ioe);
                 // if the size is zero, we have no output, so construct the result
                 // with null (required by ExecResult)


[2/2] camel git commit: CAMEL-8241: Better stream closed check to ignore case. Thanks to Brian O'Keefe for the suggestion.

Posted by da...@apache.org.
CAMEL-8241: Better stream closed check to ignore case. Thanks to Brian O'Keefe for the suggestion.


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/18d7bfca
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/18d7bfca
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/18d7bfca

Branch: refs/heads/camel-2.15.x
Commit: 18d7bfca7634d393098801fa407b3b817580368a
Parents: a7d2958
Author: Claus Ibsen <da...@apache.org>
Authored: Fri Jul 31 11:50:35 2015 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Fri Jul 31 11:52:30 2015 +0200

----------------------------------------------------------------------
 .../camel/component/exec/impl/DefaultExecCommandExecutor.java     | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/18d7bfca/components/camel-exec/src/main/java/org/apache/camel/component/exec/impl/DefaultExecCommandExecutor.java
----------------------------------------------------------------------
diff --git a/components/camel-exec/src/main/java/org/apache/camel/component/exec/impl/DefaultExecCommandExecutor.java b/components/camel-exec/src/main/java/org/apache/camel/component/exec/impl/DefaultExecCommandExecutor.java
index 9011231..b2ed60e 100644
--- a/components/camel-exec/src/main/java/org/apache/camel/component/exec/impl/DefaultExecCommandExecutor.java
+++ b/components/camel-exec/src/main/java/org/apache/camel/component/exec/impl/DefaultExecCommandExecutor.java
@@ -22,6 +22,7 @@ import java.io.File;
 import java.io.IOException;
 import java.io.InputStream;
 import java.util.List;
+import java.util.Locale;
 
 import org.apache.camel.component.exec.ExecCommand;
 import org.apache.camel.component.exec.ExecCommandExecutor;
@@ -79,7 +80,7 @@ public class DefaultExecCommandExecutor implements ExecCommandExecutor {
         } catch (IOException ioe) {
             // workaround to ignore if the stream was already closes due some race condition in commons-exec
             String msg = ioe.getMessage();
-            if ("Stream closed".equals(msg)) {
+            if (msg != null && "stream closed".equals(msg.toLowerCase(Locale.ENGLISH))) {
                 LOG.debug("Ignoring Stream closed IOException", ioe);
                 // if the size is zero, we have no output, so construct the result
                 // with null (required by ExecResult)