It was probably not a very clever idea to remove the lSep since it is probably used by user-written loggers. To further shoot myself in the foot I noticed that I was compiling a different Ant repository than the in the one I was doing my changes... NB:If I continue this way I promise to stay away from code for a while and take some vacations. git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@270160 13f79535-47bb-0310-9956-ffa450edef68master
| @@ -73,6 +73,9 @@ public class DefaultLogger implements BuildLogger { | |||||
| protected int msgOutputLevel = Project.MSG_ERR; | protected int msgOutputLevel = Project.MSG_ERR; | ||||
| private long startTime = System.currentTimeMillis(); | private long startTime = System.currentTimeMillis(); | ||||
| /** line separator */ | |||||
| protected final static String lSep = StringUtils.LINE_SEP; | |||||
| protected boolean emacsMode = false; | protected boolean emacsMode = false; | ||||
| /** | /** | ||||
| @@ -54,6 +54,8 @@ | |||||
| package org.apache.tools.ant; | package org.apache.tools.ant; | ||||
| import org.apache.tools.ant.util.StringUtils; | |||||
| /** | /** | ||||
| * Extends DefaultLogger to strip out empty targets. | * Extends DefaultLogger to strip out empty targets. | ||||
| * | * | ||||
| @@ -61,8 +63,6 @@ package org.apache.tools.ant; | |||||
| */ | */ | ||||
| public class NoBannerLogger extends DefaultLogger { | public class NoBannerLogger extends DefaultLogger { | ||||
| static private final String lSep = System.getProperty("line.separator"); | |||||
| protected String targetName; | protected String targetName; | ||||
| public void targetStarted(BuildEvent event) { | public void targetStarted(BuildEvent event) { | ||||
| @@ -76,13 +76,13 @@ public class NoBannerLogger extends DefaultLogger { | |||||
| public void messageLogged(BuildEvent event) { | public void messageLogged(BuildEvent event) { | ||||
| if( event.getPriority() > msgOutputLevel || | if( event.getPriority() > msgOutputLevel || | ||||
| null == event.getMessage() || | |||||
| null == event.getMessage() || | |||||
| "".equals( event.getMessage().trim() ) ) { | "".equals( event.getMessage().trim() ) ) { | ||||
| return; | return; | ||||
| } | } | ||||
| if( null != targetName ) { | if( null != targetName ) { | ||||
| out.println(lSep + targetName + ":"); | |||||
| out.println(StringUtils.LINE_SEP + targetName + ":"); | |||||
| targetName = null; | targetName = null; | ||||
| } | } | ||||
| @@ -66,6 +66,7 @@ import java.util.StringTokenizer; | |||||
| import org.apache.tools.ant.BuildEvent; | import org.apache.tools.ant.BuildEvent; | ||||
| import org.apache.tools.ant.DefaultLogger; | import org.apache.tools.ant.DefaultLogger; | ||||
| import org.apache.tools.ant.Project; | import org.apache.tools.ant.Project; | ||||
| import org.apache.tools.ant.util.StringUtils; | |||||
| import org.apache.tools.mail.MailMessage; | import org.apache.tools.mail.MailMessage; | ||||
| /** | /** | ||||
| @@ -102,8 +103,6 @@ public class MailLogger extends DefaultLogger { | |||||
| private StringBuffer buffer = new StringBuffer(); | private StringBuffer buffer = new StringBuffer(); | ||||
| static private final String lSep = System.getProperty("line.separator"); | |||||
| /** | /** | ||||
| * Sends an e-mail with the log results. | * Sends an e-mail with the log results. | ||||
| * | * | ||||
| @@ -179,7 +178,7 @@ public class MailLogger extends DefaultLogger { | |||||
| *@param message | *@param message | ||||
| */ | */ | ||||
| protected void log(String message) { | protected void log(String message) { | ||||
| buffer.append(message + lSep); | |||||
| buffer.append(message + StringUtils.LINE_SEP); | |||||
| } | } | ||||