Author: sebb
Date: Sat Jan 9 16:48:58 2016
New Revision: 1723863
URL: http://svn.apache.org/viewvc?rev=1723863&view=rev
Log:
EXEC-64 DefaultExecutor swallows IOException cause instead of propagating it
(work-round for Java 1.5)
Modified:
commons/proper/exec/trunk/src/changes/changes.xml
commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/DefaultExecutor.java
Modified: commons/proper/exec/trunk/src/changes/changes.xml
URL:
http://svn.apache.org/viewvc/commons/proper/exec/trunk/src/changes/changes.xml?rev=1723863&r1=1723862&r2=1723863&view=diff
==============================================================================
--- commons/proper/exec/trunk/src/changes/changes.xml (original)
+++ commons/proper/exec/trunk/src/changes/changes.xml Sat Jan 9 16:48:58 2016
@@ -23,6 +23,12 @@
<author email="[email protected]">Siegfried Goeschl</author>
</properties>
<body>
+ <release version="1.4" date="" description="Maintenance and feature
Release">
+ <action issue="EXEC-64" dev="sebb" type="update" due-to=" Michael
Vorburger">
+ DefaultExecutor swallows IOException cause instead of
propagating it
+ (work-round for Java 1.5)
+ </action>
+ </release>
<release version="1.3" date="2014-11-02" description="Maintenance and
feature Release">
<action issue="EXEC-69" dev="ggregory" type="add" due-to="Richard
Atkins, Michael Vorburger">
DefaultExecutor async execute prevents shutdown hooks running.
Modified:
commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/DefaultExecutor.java
URL:
http://svn.apache.org/viewvc/commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/DefaultExecutor.java?rev=1723863&r1=1723862&r2=1723863&view=diff
==============================================================================
---
commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/DefaultExecutor.java
(original)
+++
commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/DefaultExecutor.java
Sat Jan 9 16:48:58 2016
@@ -408,7 +408,10 @@ public class DefaultExecutor implements
} catch (final IOException e) {
throw e;
} catch (final Exception e) {
- throw new IOException(e.getMessage());
+ // Java 1.5 does not support public IOException(String
message, Throwable cause)
+ IOException ioe = new IOException(e.getMessage());
+ ioe.initCause(e);
+ throw ioe;
}
}