git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@276387 13f79535-47bb-0310-9956-ffa450edef68master
@@ -139,7 +139,7 @@ Tasks known to support I/O redirection: | |||||
</ul> | </ul> | ||||
<p>The expected behavior of a <redirector> is to a great degree | <p>The expected behavior of a <redirector> is to a great degree | ||||
dependent on the supporting task. Any possible points of confusion | dependent on the supporting task. Any possible points of confusion | ||||
should be noted at the task level. | |||||
should be noted at the task level.</p> | |||||
<hr /> | <hr /> | ||||
<p align="center">Copyright © 2004 The Apache Software Foundation. All rights | <p align="center">Copyright © 2004 The Apache Software Foundation. All rights | ||||
Reserved.</p> | Reserved.</p> | ||||
@@ -190,7 +190,7 @@ public class ExecTask extends Task { | |||||
*/ | */ | ||||
public void setLogError(boolean logError) { | public void setLogError(boolean logError) { | ||||
redirector.setLogError(logError); | redirector.setLogError(logError); | ||||
incompatibleWithSpawn = true; | |||||
incompatibleWithSpawn |= logError; | |||||
} | } | ||||
/** | /** | ||||
@@ -236,7 +236,7 @@ public class ExecTask extends Task { | |||||
*/ | */ | ||||
public void setFailonerror(boolean fail) { | public void setFailonerror(boolean fail) { | ||||
failOnError = fail; | failOnError = fail; | ||||
incompatibleWithSpawn = true; | |||||
incompatibleWithSpawn |= fail; | |||||
} | } | ||||
/** | /** | ||||
@@ -308,8 +308,8 @@ public class ExecTask extends Task { | |||||
* @param result value desired for the result property value | * @param result value desired for the result property value | ||||
*/ | */ | ||||
protected void maybeSetResultPropertyValue(int result) { | protected void maybeSetResultPropertyValue(int result) { | ||||
String res = Integer.toString(result); | |||||
if (resultProperty != null) { | if (resultProperty != null) { | ||||
String res = Integer.toString(result); | |||||
getProject().setNewProperty(resultProperty, res); | getProject().setNewProperty(resultProperty, res); | ||||
} | } | ||||
} | } | ||||
@@ -332,6 +332,7 @@ public class Java extends Task { | |||||
*/ | */ | ||||
public void setResultProperty(String resultProperty) { | public void setResultProperty(String resultProperty) { | ||||
this.resultProperty = resultProperty; | this.resultProperty = resultProperty; | ||||
incompatibleWithSpawn = true; | |||||
} | } | ||||
/** | /** | ||||
@@ -474,7 +475,7 @@ public class Java extends Task { | |||||
*/ | */ | ||||
public void setLogError(boolean logError) { | public void setLogError(boolean logError) { | ||||
redirector.setLogError(logError); | redirector.setLogError(logError); | ||||
incompatibleWithSpawn = true; | |||||
incompatibleWithSpawn |= logError; | |||||
} | } | ||||
/** | /** | ||||
@@ -78,7 +78,7 @@ public class Redirector { | |||||
/** | /** | ||||
* The file(s) from which standard input is being taken. | * The file(s) from which standard input is being taken. | ||||
* If > 1, files' content will be concatenated in the order received. | |||||
* If > 1, files' content will be concatenated in the order received. | |||||
*/ | */ | ||||
private File[] input; | private File[] input; | ||||
@@ -137,7 +137,7 @@ public class Redirector { | |||||
/** The stream for input */ | /** The stream for input */ | ||||
private InputStream inputStream = null; | private InputStream inputStream = null; | ||||
/** Stream which are used for line oriented output */ | |||||
/** Stream which is used for line oriented output */ | |||||
private PrintStream outPrintStream = null; | private PrintStream outPrintStream = null; | ||||
/** Stream which is used for line oriented error output */ | /** Stream which is used for line oriented error output */ | ||||
@@ -47,10 +47,10 @@ public class RedirectorElement extends DataType { | |||||
private boolean usingError = false; | private boolean usingError = false; | ||||
/** | /** | ||||
* Indicates if standard error should be logged to Ant's log system | |||||
* rather than the output. This has no effect if standard error is | |||||
* redirected to a file or property. | |||||
*/ | |||||
* Indicates if standard error should be logged to Ant's log system | |||||
* rather than the output. This has no effect if standard error is | |||||
* redirected to a file or property. | |||||
*/ | |||||
private Boolean logError; | private Boolean logError; | ||||
/** The name of the property into which output is to be stored */ | /** The name of the property into which output is to be stored */ | ||||
@@ -165,6 +165,10 @@ public class RedirectorElement extends DataType { | |||||
|| inputString != null | || inputString != null | ||||
|| logError != null | || logError != null | ||||
|| append != null | || append != null | ||||
|| createEmptyFiles != null | |||||
|| inputEncoding != null | |||||
|| outputEncoding != null | |||||
|| errorEncoding != null | |||||
|| outputProperty != null | || outputProperty != null | ||||
|| errorProperty != null) { | || errorProperty != null) { | ||||
throw tooManyAttributes(); | throw tooManyAttributes(); | ||||
@@ -130,7 +130,7 @@ public class ReaderInputStream extends InputStream { | |||||
System.arraycopy(slack, begin, b, off, len); | System.arraycopy(slack, begin, b, off, len); | ||||
if ((begin+= len) >= slack.length) { | |||||
if ((begin += len) >= slack.length) { | |||||
slack = null; | slack = null; | ||||
} | } | ||||