diff --git a/src/main/org/apache/tools/ant/Project.java b/src/main/org/apache/tools/ant/Project.java index c9fbf75d8..cb010ab8f 100644 --- a/src/main/org/apache/tools/ant/Project.java +++ b/src/main/org/apache/tools/ant/Project.java @@ -1101,15 +1101,15 @@ public class Project { * the message is logged directly. * * @param output Message to handle. Should not be null. - * @param isError Whether the text represents an error (true) + * @param isWarning Whether the text represents an warning (true) * or information (false). */ - public void demuxOutput(String output, boolean isError) { + public void demuxOutput(String output, boolean isWarning) { Task task = getThreadTask(Thread.currentThread()); if (task == null) { - log(output, isError ? MSG_ERR : MSG_INFO); + log(output, isWarning ? MSG_WARN : MSG_INFO); } else { - if (isError) { + if (isWarning) { task.handleErrorOutput(output); } else { task.handleOutput(output); diff --git a/src/main/org/apache/tools/ant/Task.java b/src/main/org/apache/tools/ant/Task.java index a437cb02e..a45e804fa 100644 --- a/src/main/org/apache/tools/ant/Task.java +++ b/src/main/org/apache/tools/ant/Task.java @@ -344,12 +344,12 @@ public abstract class Task extends ProjectComponent { } /** - * Handles an error output by logging it with the ERR priority. + * Handles an error output by logging it with the WARN priority. * * @param output The error output to log. Should not be null. */ protected void handleErrorOutput(String output) { - log(output, Project.MSG_ERR); + log(output, Project.MSG_WARN); } /**