diff --git a/src/testcases/org/apache/tools/ant/taskdefs/DemuxOutputTask.java b/src/testcases/org/apache/tools/ant/taskdefs/DemuxOutputTask.java index ad4d65fe7..68a7f33ac 100644 --- a/src/testcases/org/apache/tools/ant/taskdefs/DemuxOutputTask.java +++ b/src/testcases/org/apache/tools/ant/taskdefs/DemuxOutputTask.java @@ -88,7 +88,7 @@ public class DemuxOutputTask extends Task { } protected void handleOutput(String line) { - if (!line.equals(randomOutValue)) { + if (line.length() != 0 && !line.equals(randomOutValue)) { String message = "Received = [" + line + "], expected = [" + randomOutValue + "]"; throw new BuildException(message); @@ -97,7 +97,7 @@ public class DemuxOutputTask extends Task { } protected void handleErrorOutput(String line) { - if (!line.equals(randomErrValue)) { + if (line.length() != 0 && !line.equals(randomErrValue)) { String message = "Received = [" + line + "], expected = [" + randomErrValue + "]"; throw new BuildException(message);