diff --git a/docs/manual/CoreTypes/redirector.html b/docs/manual/CoreTypes/redirector.html index 45ccec4c9..20fd23a02 100644 --- a/docs/manual/CoreTypes/redirector.html +++ b/docs/manual/CoreTypes/redirector.html @@ -139,7 +139,7 @@ Tasks known to support I/O redirection:
The expected behavior of a <redirector> is to a great degree dependent on the supporting task. Any possible points of confusion -should be noted at the task level. +should be noted at the task level.
Copyright © 2004 The Apache Software Foundation. All rights Reserved.
diff --git a/src/main/org/apache/tools/ant/taskdefs/ExecTask.java b/src/main/org/apache/tools/ant/taskdefs/ExecTask.java index fd376b942..f3d2a9086 100644 --- a/src/main/org/apache/tools/ant/taskdefs/ExecTask.java +++ b/src/main/org/apache/tools/ant/taskdefs/ExecTask.java @@ -190,7 +190,7 @@ public class ExecTask extends Task { */ public void setLogError(boolean logError) { redirector.setLogError(logError); - incompatibleWithSpawn = true; + incompatibleWithSpawn |= logError; } /** @@ -236,7 +236,7 @@ public class ExecTask extends Task { */ public void setFailonerror(boolean 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 */ protected void maybeSetResultPropertyValue(int result) { - String res = Integer.toString(result); if (resultProperty != null) { + String res = Integer.toString(result); getProject().setNewProperty(resultProperty, res); } } diff --git a/src/main/org/apache/tools/ant/taskdefs/Java.java b/src/main/org/apache/tools/ant/taskdefs/Java.java index 92b2ea257..6597a6652 100644 --- a/src/main/org/apache/tools/ant/taskdefs/Java.java +++ b/src/main/org/apache/tools/ant/taskdefs/Java.java @@ -332,6 +332,7 @@ public class Java extends Task { */ public void setResultProperty(String resultProperty) { this.resultProperty = resultProperty; + incompatibleWithSpawn = true; } /** @@ -474,7 +475,7 @@ public class Java extends Task { */ public void setLogError(boolean logError) { redirector.setLogError(logError); - incompatibleWithSpawn = true; + incompatibleWithSpawn |= logError; } /** diff --git a/src/main/org/apache/tools/ant/taskdefs/Redirector.java b/src/main/org/apache/tools/ant/taskdefs/Redirector.java index ade98f77f..917a43fcf 100644 --- a/src/main/org/apache/tools/ant/taskdefs/Redirector.java +++ b/src/main/org/apache/tools/ant/taskdefs/Redirector.java @@ -78,7 +78,7 @@ public class Redirector { /** * 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; @@ -137,7 +137,7 @@ public class Redirector { /** The stream for input */ private InputStream inputStream = null; - /** Stream which are used for line oriented output */ + /** Stream which is used for line oriented output */ private PrintStream outPrintStream = null; /** Stream which is used for line oriented error output */ diff --git a/src/main/org/apache/tools/ant/types/RedirectorElement.java b/src/main/org/apache/tools/ant/types/RedirectorElement.java index 267c71aa3..245b25ce9 100755 --- a/src/main/org/apache/tools/ant/types/RedirectorElement.java +++ b/src/main/org/apache/tools/ant/types/RedirectorElement.java @@ -47,10 +47,10 @@ public class RedirectorElement extends DataType { 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; /** The name of the property into which output is to be stored */ @@ -165,6 +165,10 @@ public class RedirectorElement extends DataType { || inputString != null || logError != null || append != null + || createEmptyFiles != null + || inputEncoding != null + || outputEncoding != null + || errorEncoding != null || outputProperty != null || errorProperty != null) { throw tooManyAttributes(); diff --git a/src/main/org/apache/tools/ant/util/ReaderInputStream.java b/src/main/org/apache/tools/ant/util/ReaderInputStream.java index 913a1a2c7..3c43267b6 100755 --- a/src/main/org/apache/tools/ant/util/ReaderInputStream.java +++ b/src/main/org/apache/tools/ant/util/ReaderInputStream.java @@ -130,7 +130,7 @@ public class ReaderInputStream extends InputStream { System.arraycopy(slack, begin, b, off, len); - if ((begin+= len) >= slack.length) { + if ((begin += len) >= slack.length) { slack = null; }