ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject cvs commit: jakarta-ant-myrmidon/framework/src/todo/org/apache/tools/todo/taskdefs/text Replace.java
Date Sat, 20 Apr 2002 12:53:38 GMT
donaldp     02/04/20 05:53:38

  Modified:    antlib/src/conf archive.mf selftest.mf
               antlib/src/java/org/apache/antlib/cvslib CVSPass.java
               aut/src/java/org/apache/aut/nativelib/impl Environment.java
               container/src/java/org/apache/myrmidon/components/builder
                        DefaultProjectBuilder.java
               container/src/java/org/apache/myrmidon/interfaces
                        EmbeddedAnt.java
               framework/src/java/org/apache/myrmidon/framework/conditions
                        IsTrueCondition.java NotCondition.java
                        OrCondition.java
               framework/src/java/org/apache/myrmidon/framework/file
                        ArrayFileList.java FileListToStringConverter.java
                        FileListUtil.java ParsedPathElement.java Path.java
                        StringToPathConverter.java
               framework/src/java/org/apache/myrmidon/framework/java
                        ExecuteJava.java JavaRuntimeClassPath.java
               framework/src/java/org/apache/myrmidon/framework/nativelib
                        ArgumentList.java Commandline.java Execute.java
               framework/src/todo/org/apache/tools/todo/taskdefs Javah.java
                        NetRexxC.java
               framework/src/todo/org/apache/tools/todo/taskdefs/javac
                        DefaultCompilerAdapter.java
               framework/src/todo/org/apache/tools/todo/taskdefs/jsp/compilers
                        DefaultCompilerAdapter.java
               framework/src/todo/org/apache/tools/todo/taskdefs/junit
                        BriefJUnitResultFormatter.java
                        DOMElementWriter.java
                        PlainJUnitResultFormatter.java
                        SummaryJUnitResultFormatter.java
               framework/src/todo/org/apache/tools/todo/taskdefs/text
                        Replace.java
  Log:
  Remove coupling on StringUtil
  
  Revision  Changes    Path
  1.3       +1 -1      jakarta-ant-myrmidon/antlib/src/conf/archive.mf
  
  Index: archive.mf
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/antlib/src/conf/archive.mf,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- archive.mf	19 Apr 2002 12:29:17 -0000	1.2
  +++ archive.mf	20 Apr 2002 12:53:37 -0000	1.3
  @@ -1,4 +1,4 @@
   Manifest-Version: 1.0
   Created-By: Apache Ant Project
  -Extension-List: ext2
  +Extension-List: ext1
   ext1-Extension-Name: excalibur-bzip2
  
  
  
  1.3       +1 -1      jakarta-ant-myrmidon/antlib/src/conf/selftest.mf
  
  Index: selftest.mf
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/antlib/src/conf/selftest.mf,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- selftest.mf	19 Apr 2002 12:29:17 -0000	1.2
  +++ selftest.mf	20 Apr 2002 12:53:37 -0000	1.3
  @@ -1,6 +1,6 @@
   Manifest-Version: 1.0
   Created-By: Apache Ant Project
  -Extension-List: ext2 ext3
  +Extension-List: ext1 ext2
   ext1-Extension-Name: myrmidon.test.extension
   ext1-Specification-Version: 1.0
   ext1-Implementation-Vendor-Id: org.apache.avalon
  
  
  
  1.2       +3 -3      jakarta-ant-myrmidon/antlib/src/java/org/apache/antlib/cvslib/CVSPass.java
  
  Index: CVSPass.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/antlib/src/java/org/apache/antlib/cvslib/CVSPass.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- CVSPass.java	14 Apr 2002 10:56:02 -0000	1.1
  +++ CVSPass.java	20 Apr 2002 12:53:37 -0000	1.2
  @@ -15,7 +15,6 @@
   import java.io.PrintWriter;
   import org.apache.avalon.excalibur.i18n.ResourceManager;
   import org.apache.avalon.excalibur.i18n.Resources;
  -import org.apache.avalon.excalibur.util.StringUtil;
   import org.apache.myrmidon.api.AbstractTask;
   import org.apache.myrmidon.api.TaskException;
   
  @@ -23,7 +22,7 @@
    * CVSLogin Adds an new entry to a CVS password file
    *
    * @author <a href="jeff@custommonkey.org">Jeff Martin</a>
  - * @version $Revision: 1.1 $ $Date: 2002/04/14 10:56:02 $
  + * @version $Revision: 1.2 $ $Date: 2002/04/20 12:53:37 $
    * @ant.task name="cvs-pass"
    */
   public class CVSPass
  @@ -130,7 +129,8 @@
                   {
                       if( !line.startsWith( m_cvsRoot ) )
                       {
  -                        sb.append( line + StringUtil.LINE_SEPARATOR );
  +                        sb.append( line );
  +                        sb.append( System.getProperty( "line.separator" ) );
                       }
                   }
   
  
  
  
  1.7       +8 -6      jakarta-ant-myrmidon/aut/src/java/org/apache/aut/nativelib/impl/Environment.java
  
  Index: Environment.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/aut/src/java/org/apache/aut/nativelib/impl/Environment.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- Environment.java	29 Mar 2002 12:56:37 -0000	1.6
  +++ Environment.java	20 Apr 2002 12:53:37 -0000	1.7
  @@ -18,7 +18,6 @@
   import org.apache.aut.nativelib.ExecMetaData;
   import org.apache.aut.nativelib.Os;
   import org.apache.avalon.excalibur.io.IOUtil;
  -import org.apache.avalon.excalibur.util.StringUtil;
   
   /**
    * This is the class that can be used to retrieve the environment
  @@ -26,7 +25,7 @@
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
    * @author <a href="mailto:thomas.haas@softwired-inc.com">Thomas Haas</a>
  - * @version $Revision: 1.6 $ $Date: 2002/03/29 12:56:37 $
  + * @version $Revision: 1.7 $ $Date: 2002/04/20 12:53:37 $
    */
   final class Environment
   {
  @@ -98,7 +97,7 @@
               {
                   // Chunk part of previous env var (UNIX env vars can
                   // contain embedded new lines).
  -                var.append( StringUtil.LINE_SEPARATOR );
  +                var.append( System.getProperty( "line.separator" ) );
               }
               else
               {
  @@ -157,7 +156,8 @@
           final ExecMetaData metaData = new ExecMetaData( command, null, workingDirectory );
   
           final ByteArrayOutputStream output = new ByteArrayOutputStream();
  -        try {
  +        try
  +        {
               final int retval = m_execManager.execute( metaData, null, output, output, 0 );
               if( retval != 0 )
               {
  @@ -165,7 +165,9 @@
               }
   
               return output.toString();
  -        } finally {
  +        }
  +        finally
  +        {
               IOUtil.shutdownStream( output );
           }
       }
  @@ -187,7 +189,7 @@
               // Windows 2000/NT
               return CMD_EXE;
           }
  -        else if( Os.isFamily( Os.OS_FAMILY_WINDOWS) )
  +        else if( Os.isFamily( Os.OS_FAMILY_WINDOWS ) )
           {
               // Windows 98/95 - need to use an auxiliary script
               return COMMAND_COM;
  
  
  
  1.44      +25 -5     jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/components/builder/DefaultProjectBuilder.java
  
  Index: DefaultProjectBuilder.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/components/builder/DefaultProjectBuilder.java,v
  retrieving revision 1.43
  retrieving revision 1.44
  diff -u -r1.43 -r1.44
  --- DefaultProjectBuilder.java	7 Apr 2002 06:51:40 -0000	1.43
  +++ DefaultProjectBuilder.java	20 Apr 2002 12:53:37 -0000	1.44
  @@ -10,12 +10,12 @@
   import java.io.File;
   import java.util.ArrayList;
   import java.util.HashMap;
  +import java.util.StringTokenizer;
   import javax.xml.parsers.SAXParser;
   import javax.xml.parsers.SAXParserFactory;
   import org.apache.avalon.excalibur.i18n.ResourceManager;
   import org.apache.avalon.excalibur.i18n.Resources;
   import org.apache.avalon.excalibur.io.FileUtil;
  -import org.apache.avalon.excalibur.util.StringUtil;
   import org.apache.avalon.framework.Version;
   import org.apache.avalon.framework.configuration.Configuration;
   import org.apache.avalon.framework.configuration.ConfigurationException;
  @@ -34,7 +34,7 @@
    * Default implementation to construct project from a build file.
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.43 $ $Date: 2002/04/07 06:51:40 $
  + * @version $Revision: 1.44 $ $Date: 2002/04/20 12:53:37 $
    *
    * @ant.type type="project-builder" name="ant2"
    */
  @@ -403,7 +403,7 @@
        */
       private String extractURL( final File file ) throws ProjectException
       {
  -        if( ! file.isFile() )
  +        if( !file.isFile() )
           {
               final String message = REZ.getString( "ant.no-project-file.error" );
               throw new ProjectException( message );
  @@ -507,7 +507,7 @@
               return null;
           }
   
  -        final String[] elements = StringUtil.split( depends, "," );
  +        final String[] elements = split( depends, "," );
           final ArrayList dependsList = new ArrayList();
   
           for( int i = 0; i < elements.length; i++ )
  @@ -548,6 +548,26 @@
               dependsList.add( new Dependency( projectName, targetName ) );
           }
   
  -        return (Dependency[])dependsList.toArray( new Dependency[dependsList.size() ] );
  +        return (Dependency[])dependsList.toArray( new Dependency[ dependsList.size() ] );
  +    }
  +
  +    /**
  +     * Splits the string on every token into an array of strings.
  +     *
  +     * @param string the string
  +     * @param onToken the token
  +     * @return the resultant array
  +     */
  +    private String[] split( final String string, final String onToken )
  +    {
  +        final StringTokenizer tokenizer = new StringTokenizer( string, onToken );
  +        final String[] result = new String[ tokenizer.countTokens() ];
  +
  +        for( int i = 0; i < result.length; i++ )
  +        {
  +            result[ i ] = tokenizer.nextToken();
  +        }
  +
  +        return result;
       }
   }
  
  
  
  1.3       +24 -4     jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/interfaces/EmbeddedAnt.java
  
  Index: EmbeddedAnt.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/interfaces/EmbeddedAnt.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- EmbeddedAnt.java	19 Apr 2002 12:09:55 -0000	1.2
  +++ EmbeddedAnt.java	20 Apr 2002 12:53:37 -0000	1.3
  @@ -11,10 +11,10 @@
   import java.util.ArrayList;
   import java.util.HashMap;
   import java.util.Map;
  +import java.util.StringTokenizer;
   import org.apache.avalon.excalibur.i18n.ResourceManager;
   import org.apache.avalon.excalibur.i18n.Resources;
   import org.apache.avalon.excalibur.io.FileUtil;
  -import org.apache.avalon.excalibur.util.StringUtil;
   import org.apache.avalon.framework.activity.Disposable;
   import org.apache.avalon.framework.activity.Initializable;
   import org.apache.avalon.framework.activity.Startable;
  @@ -40,7 +40,7 @@
    *
    * @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a>
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.2 $ $Date: 2002/04/19 12:09:55 $
  + * @version $Revision: 1.3 $ $Date: 2002/04/20 12:53:37 $
    */
   public class EmbeddedAnt
       extends AbstractLogEnabled
  @@ -249,7 +249,7 @@
        * Make sure myrmidon home directory has been specified, and is a
        * directory.  Set the paths that the embeddor expects.
        */
  -    private void setupPaths(  Map parameters ) throws Exception
  +    private void setupPaths( Map parameters ) throws Exception
       {
           if( m_homeDir == null )
           {
  @@ -397,7 +397,7 @@
           // Add the additional path
           if( path != null )
           {
  -            final String[] split = StringUtil.split( path, File.pathSeparator );
  +            final String[] split = split( path, File.pathSeparator );
               for( int i = 0; i < split.length; i++ )
               {
                   final String s = split[ i ];
  @@ -414,6 +414,26 @@
           }
   
           return (File[])files.toArray( new File[ files.size() ] );
  +    }
  +
  +    /**
  +     * Splits the string on every token into an array of strings.
  +     *
  +     * @param string the string
  +     * @param onToken the token
  +     * @return the resultant array
  +     */
  +    private String[] split( final String string, final String onToken )
  +    {
  +        final StringTokenizer tokenizer = new StringTokenizer( string, onToken );
  +        final String[] result = new String[ tokenizer.countTokens() ];
  +
  +        for( int i = 0; i < result.length; i++ )
  +        {
  +            result[ i ] = tokenizer.nextToken();
  +        }
  +
  +        return result;
       }
   
       /**
  
  
  
  1.2       +3 -3      jakarta-ant-myrmidon/framework/src/java/org/apache/myrmidon/framework/conditions/IsTrueCondition.java
  
  Index: IsTrueCondition.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/framework/src/java/org/apache/myrmidon/framework/conditions/IsTrueCondition.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- IsTrueCondition.java	14 Apr 2002 09:30:14 -0000	1.1
  +++ IsTrueCondition.java	20 Apr 2002 12:53:37 -0000	1.2
  @@ -7,12 +7,12 @@
    */
   package org.apache.myrmidon.framework.conditions;
   
  +import org.apache.aut.converter.Converter;
  +import org.apache.aut.converter.ConverterException;
   import org.apache.avalon.excalibur.i18n.ResourceManager;
   import org.apache.avalon.excalibur.i18n.Resources;
   import org.apache.myrmidon.api.TaskContext;
   import org.apache.myrmidon.api.TaskException;
  -import org.apache.aut.converter.Converter;
  -import org.apache.aut.converter.ConverterException;
   
   /**
    * A {@link Condition} that is true when a property is set, but not set to
  @@ -21,7 +21,7 @@
    * @author <a href="mailto:stefan.bodewig@epost.de">Stefan Bodewig</a>
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
    * @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a>
  - * @version $Revision: 1.1 $ $Date: 2002/04/14 09:30:14 $
  + * @version $Revision: 1.2 $ $Date: 2002/04/20 12:53:37 $
    *
    * @ant.type type="condition" name="is-true"
    */
  
  
  
  1.2       +4 -4      jakarta-ant-myrmidon/framework/src/java/org/apache/myrmidon/framework/conditions/NotCondition.java
  
  Index: NotCondition.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/framework/src/java/org/apache/myrmidon/framework/conditions/NotCondition.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- NotCondition.java	14 Apr 2002 09:30:14 -0000	1.1
  +++ NotCondition.java	20 Apr 2002 12:53:37 -0000	1.2
  @@ -7,17 +7,17 @@
    */
   package org.apache.myrmidon.framework.conditions;
   
  -import org.apache.myrmidon.api.TaskContext;
  -import org.apache.myrmidon.api.TaskException;
   import org.apache.avalon.excalibur.i18n.ResourceManager;
   import org.apache.avalon.excalibur.i18n.Resources;
  +import org.apache.myrmidon.api.TaskContext;
  +import org.apache.myrmidon.api.TaskException;
   
   /**
    * &lt;not&gt; condition. Evaluates to true if the single condition nested into
    * it is false and vice versa.
    *
    * @author <a href="mailto:stefan.bodewig@epost.de">Stefan Bodewig</a>
  - * @version $Revision: 1.1 $
  + * @version $Revision: 1.2 $
    *
    * @ant.type type="condition" name="not"
    */
  @@ -64,6 +64,6 @@
               throw new TaskException( message );
           }
   
  -        return ! m_condition.evaluate( context );
  +        return !m_condition.evaluate( context );
       }
   }
  
  
  
  1.2       +2 -2      jakarta-ant-myrmidon/framework/src/java/org/apache/myrmidon/framework/conditions/OrCondition.java
  
  Index: OrCondition.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/framework/src/java/org/apache/myrmidon/framework/conditions/OrCondition.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- OrCondition.java	14 Apr 2002 09:30:14 -0000	1.1
  +++ OrCondition.java	20 Apr 2002 12:53:37 -0000	1.2
  @@ -18,7 +18,7 @@
    * true.  An empty container evaluates to true</p>
    *
    * @author <a href="mailto:stefan.bodewig@epost.de">Stefan Bodewig</a>
  - * @version $Revision: 1.1 $
  + * @version $Revision: 1.2 $
    *
    * @ant.type type="condition" name="or"
    */
  @@ -51,6 +51,6 @@
                   return true;
               }
           }
  -        return (count == 0);
  +        return ( count == 0 );
       }
   }
  
  
  
  1.2       +2 -2      jakarta-ant-myrmidon/framework/src/java/org/apache/myrmidon/framework/file/ArrayFileList.java
  
  Index: ArrayFileList.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/framework/src/java/org/apache/myrmidon/framework/file/ArrayFileList.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ArrayFileList.java	14 Apr 2002 09:30:14 -0000	1.1
  +++ ArrayFileList.java	20 Apr 2002 12:53:37 -0000	1.2
  @@ -14,7 +14,7 @@
    * A PathElement made up of an array of strings.
    *
    * @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a>
  - * @version $Revision: 1.1 $ $Date: 2002/04/14 09:30:14 $
  + * @version $Revision: 1.2 $ $Date: 2002/04/20 12:53:37 $
    */
   public class ArrayFileList
       implements FileList
  @@ -23,7 +23,7 @@
   
       public ArrayFileList( final String part )
       {
  -        m_parts = new String[] { part } ;
  +        m_parts = new String[]{part};
       }
   
       public ArrayFileList( final String[] parts )
  
  
  
  1.2       +1 -2      jakarta-ant-myrmidon/framework/src/java/org/apache/myrmidon/framework/file/FileListToStringConverter.java
  
  Index: FileListToStringConverter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/framework/src/java/org/apache/myrmidon/framework/file/FileListToStringConverter.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- FileListToStringConverter.java	14 Apr 2002 09:30:14 -0000	1.1
  +++ FileListToStringConverter.java	20 Apr 2002 12:53:37 -0000	1.2
  @@ -12,13 +12,12 @@
   import org.apache.aut.nativelib.PathUtil;
   import org.apache.myrmidon.api.TaskContext;
   import org.apache.myrmidon.api.TaskException;
  -import org.apache.myrmidon.framework.file.FileList;
   
   /**
    * Converters from FileList to String.
    *
    * @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a>
  - * @version $Revision: 1.1 $ $Date: 2002/04/14 09:30:14 $
  + * @version $Revision: 1.2 $ $Date: 2002/04/20 12:53:37 $
    *
    * @ant.converter source="org.apache.myrmidon.framework.file.FileList" destination="java.lang.String"
    */
  
  
  
  1.2       +6 -6      jakarta-ant-myrmidon/framework/src/java/org/apache/myrmidon/framework/file/FileListUtil.java
  
  Index: FileListUtil.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/framework/src/java/org/apache/myrmidon/framework/file/FileListUtil.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- FileListUtil.java	14 Apr 2002 09:30:14 -0000	1.1
  +++ FileListUtil.java	20 Apr 2002 12:53:37 -0000	1.2
  @@ -7,21 +7,21 @@
    */
   package org.apache.myrmidon.framework.file;
   
  -import org.apache.myrmidon.api.TaskContext;
  -import org.apache.myrmidon.api.TaskException;
  -import org.apache.myrmidon.interfaces.classloader.ClassLoaderManager;
  -import org.apache.myrmidon.interfaces.classloader.ClassLoaderException;
  -import org.apache.aut.nativelib.PathUtil;
   import java.io.File;
   import java.io.IOException;
   import java.net.URL;
  +import org.apache.aut.nativelib.PathUtil;
  +import org.apache.myrmidon.api.TaskContext;
  +import org.apache.myrmidon.api.TaskException;
  +import org.apache.myrmidon.interfaces.classloader.ClassLoaderException;
  +import org.apache.myrmidon.interfaces.classloader.ClassLoaderManager;
   
   /**
    * Utility methods for dealing with {@link FileList} objects.
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
    * @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a>
  - * @version $Revision: 1.1 $ $Date: 2002/04/14 09:30:14 $
  + * @version $Revision: 1.2 $ $Date: 2002/04/20 12:53:37 $
    */
   public final class FileListUtil
   {
  
  
  
  1.2       +1 -2      jakarta-ant-myrmidon/framework/src/java/org/apache/myrmidon/framework/file/ParsedPathElement.java
  
  Index: ParsedPathElement.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/framework/src/java/org/apache/myrmidon/framework/file/ParsedPathElement.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ParsedPathElement.java	14 Apr 2002 09:30:14 -0000	1.1
  +++ ParsedPathElement.java	20 Apr 2002 12:53:37 -0000	1.2
  @@ -9,14 +9,13 @@
   
   import org.apache.myrmidon.api.TaskContext;
   import org.apache.myrmidon.api.TaskException;
  -import org.apache.myrmidon.framework.file.FileList;
   import org.apache.tools.todo.util.FileUtils;
   
   /**
    * A PathElement that is parsed from a string.
    *
    * @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a>
  - * @version $Revision: 1.1 $ $Date: 2002/04/14 09:30:14 $
  + * @version $Revision: 1.2 $ $Date: 2002/04/20 12:53:37 $
    */
   public class ParsedPathElement
       implements FileList
  
  
  
  1.2       +1 -3      jakarta-ant-myrmidon/framework/src/java/org/apache/myrmidon/framework/file/Path.java
  
  Index: Path.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/framework/src/java/org/apache/myrmidon/framework/file/Path.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Path.java	14 Apr 2002 09:30:14 -0000	1.1
  +++ Path.java	20 Apr 2002 12:53:37 -0000	1.2
  @@ -13,11 +13,9 @@
   import org.apache.myrmidon.api.TaskException;
   import org.apache.myrmidon.framework.DataType;
   import org.apache.myrmidon.framework.FileSet;
  -import org.apache.myrmidon.framework.file.ArrayFileList;
  -import org.apache.myrmidon.framework.file.FileList;
  -import org.apache.tools.todo.util.FileUtils;
   import org.apache.tools.todo.types.DirectoryScanner;
   import org.apache.tools.todo.types.ScannerUtil;
  +import org.apache.tools.todo.util.FileUtils;
   
   /**
    * This object represents a path as used by CLASSPATH or PATH environment
  
  
  
  1.2       +1 -2      jakarta-ant-myrmidon/framework/src/java/org/apache/myrmidon/framework/file/StringToPathConverter.java
  
  Index: StringToPathConverter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/framework/src/java/org/apache/myrmidon/framework/file/StringToPathConverter.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- StringToPathConverter.java	14 Apr 2002 09:30:14 -0000	1.1
  +++ StringToPathConverter.java	20 Apr 2002 12:53:37 -0000	1.2
  @@ -9,13 +9,12 @@
   
   import org.apache.aut.converter.AbstractConverter;
   import org.apache.aut.converter.ConverterException;
  -import org.apache.myrmidon.framework.file.Path;
   
   /**
    * A converter from String to Path.
    *
    * @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a>
  - * @version $Revision: 1.1 $ $Date: 2002/04/14 09:30:14 $
  + * @version $Revision: 1.2 $ $Date: 2002/04/20 12:53:37 $
    *
    * @ant.converter source="java.lang.String" destination="org.apache.myrmidon.framework.file.Path"
    */
  
  
  
  1.2       +6 -6      jakarta-ant-myrmidon/framework/src/java/org/apache/myrmidon/framework/java/ExecuteJava.java
  
  Index: ExecuteJava.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/framework/src/java/org/apache/myrmidon/framework/java/ExecuteJava.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ExecuteJava.java	14 Apr 2002 09:30:14 -0000	1.1
  +++ ExecuteJava.java	20 Apr 2002 12:53:38 -0000	1.2
  @@ -16,12 +16,12 @@
   import org.apache.avalon.excalibur.i18n.Resources;
   import org.apache.myrmidon.api.TaskContext;
   import org.apache.myrmidon.api.TaskException;
  -import org.apache.myrmidon.framework.nativelib.Execute;
  -import org.apache.myrmidon.framework.file.Path;
   import org.apache.myrmidon.framework.file.FileListUtil;
  +import org.apache.myrmidon.framework.file.Path;
  +import org.apache.myrmidon.framework.nativelib.ArgumentList;
   import org.apache.myrmidon.framework.nativelib.EnvironmentData;
  +import org.apache.myrmidon.framework.nativelib.Execute;
   import org.apache.tools.todo.types.SysProperties;
  -import org.apache.myrmidon.framework.nativelib.ArgumentList;
   import org.apache.tools.todo.util.FileUtils;
   
   /**
  @@ -247,9 +247,9 @@
           // Call the main method
           try
           {
  -            final Class[] params = { args.getClass() };
  +            final Class[] params = {args.getClass()};
               final Method main = target.getMethod( "main", params );
  -            main.invoke( null, new Object[] { args } );
  +            main.invoke( null, new Object[]{args} );
           }
           catch( final InvocationTargetException e )
           {
  @@ -354,7 +354,7 @@
   
           // Figure out the basename
           final String baseName;
  -        if( Os.isFamily( Os.OS_FAMILY_WINDOWS) || Os.isFamily( Os.OS_FAMILY_DOS ) )
  +        if( Os.isFamily( Os.OS_FAMILY_WINDOWS ) || Os.isFamily( Os.OS_FAMILY_DOS ) )
           {
               baseName = "java.exe";
           }
  
  
  
  1.2       +7 -7      jakarta-ant-myrmidon/framework/src/java/org/apache/myrmidon/framework/java/JavaRuntimeClassPath.java
  
  Index: JavaRuntimeClassPath.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/framework/src/java/org/apache/myrmidon/framework/java/JavaRuntimeClassPath.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- JavaRuntimeClassPath.java	14 Apr 2002 09:30:14 -0000	1.1
  +++ JavaRuntimeClassPath.java	20 Apr 2002 12:53:38 -0000	1.2
  @@ -7,20 +7,20 @@
    */
   package org.apache.myrmidon.framework.java;
   
  +import java.io.File;
  +import java.util.Locale;
  +import org.apache.aut.nativelib.Os;
  +import org.apache.myrmidon.api.TaskContext;
  +import org.apache.myrmidon.api.TaskException;
  +import org.apache.myrmidon.framework.FileSet;
   import org.apache.myrmidon.framework.file.FileList;
   import org.apache.myrmidon.framework.file.Path;
  -import org.apache.myrmidon.framework.FileSet;
  -import org.apache.myrmidon.api.TaskException;
  -import org.apache.myrmidon.api.TaskContext;
  -import org.apache.aut.nativelib.Os;
  -import java.util.Locale;
  -import java.io.File;
   
   /**
    * A FileList that evaluates to the runtime class-path for this JVM.
    *
    * @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a>
  - * @version $Revision: 1.1 $ $Date: 2002/04/14 09:30:14 $
  + * @version $Revision: 1.2 $ $Date: 2002/04/20 12:53:38 $
    *
    * @ant.type type="path" name="java-runtime"
    */
  
  
  
  1.2       +2 -2      jakarta-ant-myrmidon/framework/src/java/org/apache/myrmidon/framework/nativelib/ArgumentList.java
  
  Index: ArgumentList.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/framework/src/java/org/apache/myrmidon/framework/nativelib/ArgumentList.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ArgumentList.java	14 Apr 2002 09:30:15 -0000	1.1
  +++ ArgumentList.java	20 Apr 2002 12:53:38 -0000	1.2
  @@ -7,8 +7,8 @@
    */
   package org.apache.myrmidon.framework.nativelib;
   
  -import java.util.ArrayList;
   import java.io.File;
  +import java.util.ArrayList;
   import org.apache.myrmidon.api.TaskException;
   import org.apache.tools.todo.util.FileUtils;
   
  @@ -18,7 +18,7 @@
    * @author thomas.haas@softwired-inc.com
    * @author <a href="mailto:stefan.bodewig@epost.de">Stefan Bodewig</a>
    * @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a>
  - * @version $Revision: 1.1 $ $Date: 2002/04/14 09:30:15 $
  + * @version $Revision: 1.2 $ $Date: 2002/04/20 12:53:38 $
    */
   public class ArgumentList
   {
  
  
  
  1.2       +0 -2      jakarta-ant-myrmidon/framework/src/java/org/apache/myrmidon/framework/nativelib/Commandline.java
  
  Index: Commandline.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/framework/src/java/org/apache/myrmidon/framework/nativelib/Commandline.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Commandline.java	14 Apr 2002 09:30:15 -0000	1.1
  +++ Commandline.java	20 Apr 2002 12:53:38 -0000	1.2
  @@ -7,8 +7,6 @@
    */
   package org.apache.myrmidon.framework.nativelib;
   
  -
  -
   /**
    * Commandline objects help handling command lines specifying processes to
    * execute. The class can be used to define a command line as nested elements or
  
  
  
  1.2       +3 -3      jakarta-ant-myrmidon/framework/src/java/org/apache/myrmidon/framework/nativelib/Execute.java
  
  Index: Execute.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/framework/src/java/org/apache/myrmidon/framework/nativelib/Execute.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Execute.java	14 Apr 2002 09:30:15 -0000	1.1
  +++ Execute.java	20 Apr 2002 12:53:38 -0000	1.2
  @@ -28,7 +28,7 @@
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
    * @author <a href="mailto:thomas.haas@softwired-inc.com">Thomas Haas</a>
  - * @version $Revision: 1.1 $ $Date: 2002/04/14 09:30:15 $
  + * @version $Revision: 1.2 $ $Date: 2002/04/20 12:53:38 $
    */
   public class Execute
       extends Commandline
  @@ -224,11 +224,11 @@
       private void checkReturnCode( final int returnCode )
           throws TaskException
       {
  -        if( ! m_ignoreReturnCode && returnCode != m_returnCode )
  +        if( !m_ignoreReturnCode && returnCode != m_returnCode )
           {
               final String message = REZ.getString( "execute.bad-resultcode.error",
                                                     getExecutable(),
  -                                                  new Integer(returnCode) );
  +                                                  new Integer( returnCode ) );
               throw new TaskException( message );
           }
       }
  
  
  
  1.2       +3 -4      jakarta-ant-myrmidon/framework/src/todo/org/apache/tools/todo/taskdefs/Javah.java
  
  Index: Javah.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/framework/src/todo/org/apache/tools/todo/taskdefs/Javah.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Javah.java	14 Apr 2002 09:31:48 -0000	1.1
  +++ Javah.java	20 Apr 2002 12:53:38 -0000	1.2
  @@ -11,7 +11,6 @@
   import java.util.ArrayList;
   import java.util.Iterator;
   import java.util.StringTokenizer;
  -import org.apache.avalon.excalibur.util.StringUtil;
   import org.apache.myrmidon.api.AbstractTask;
   import org.apache.myrmidon.api.TaskException;
   import org.apache.myrmidon.framework.file.FileListUtil;
  @@ -222,7 +221,7 @@
               {
                   final String aClass = tok.nextToken().trim();
                   cmd.addArgument( aClass );
  -                niceClassList.append( "    " + aClass + StringUtil.LINE_SEPARATOR );
  +                niceClassList.append( "    " + aClass + System.getProperty( "line.separator" ) );
                   n++;
               }
           }
  @@ -233,7 +232,7 @@
               final ClassArgument arg = (ClassArgument)enum.next();
               final String aClass = arg.getName();
               cmd.addArgument( aClass );
  -            niceClassList.append( "    " + aClass + StringUtil.LINE_SEPARATOR );
  +            niceClassList.append( "    " + aClass + System.getProperty( "line.separator" ) );
               n++;
           }
   
  @@ -243,7 +242,7 @@
               prefix.append( "es" );
           }
           prefix.append( " to be compiled:" );
  -        prefix.append( StringUtil.LINE_SEPARATOR );
  +        prefix.append( System.getProperty( "line.separator" ) );
   
           getContext().debug( prefix.toString() + niceClassList.toString() );
       }
  
  
  
  1.2       +7 -11     jakarta-ant-myrmidon/framework/src/todo/org/apache/tools/todo/taskdefs/NetRexxC.java
  
  Index: NetRexxC.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/framework/src/todo/org/apache/tools/todo/taskdefs/NetRexxC.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- NetRexxC.java	14 Apr 2002 09:31:48 -0000	1.1
  +++ NetRexxC.java	20 Apr 2002 12:53:38 -0000	1.2
  @@ -18,11 +18,7 @@
   import java.util.StringTokenizer;
   import netrexx.lang.Rexx;
   import org.apache.avalon.excalibur.io.FileUtil;
  -import org.apache.avalon.excalibur.util.StringUtil;
   import org.apache.myrmidon.api.TaskException;
  -import org.apache.myrmidon.api.AbstractTask;
  -import org.apache.myrmidon.api.TaskContext;
  -import org.apache.tools.todo.taskdefs.MatchingTask;
   import org.apache.tools.todo.types.DirectoryScanner;
   
   /**
  @@ -505,8 +501,8 @@
           if( compileList.size() > 0 )
           {
               getContext().info( "Compiling " + compileList.size() + " source file"
  -                              + ( compileList.size() == 1 ? "" : "s" )
  -                              + " to " + destDir );
  +                               + ( compileList.size() == 1 ? "" : "s" )
  +                               + " to " + destDir );
               doNetRexxCompile();
           }
       }
  @@ -588,7 +584,7 @@
           throws TaskException
       {
           final StringTokenizer tok = new StringTokenizer( source,
  -                                                   System.getProperty( "path.separator" ), false );
  +                                                         System.getProperty( "path.separator" ), false );
           while( tok.hasMoreTokens() )
           {
               File f = getContext().resolveFile( tok.nextToken() );
  @@ -615,8 +611,8 @@
           if( filecopyList.size() > 0 )
           {
               getContext().info( "Copying " + filecopyList.size() + " file"
  -                              + ( filecopyList.size() == 1 ? "" : "s" )
  -                              + " to " + destDir.getAbsolutePath() );
  +                               + ( filecopyList.size() == 1 ? "" : "s" )
  +                               + " to " + destDir.getAbsolutePath() );
               Iterator enum = filecopyList.keySet().iterator();
               while( enum.hasNext() )
               {
  @@ -680,13 +676,13 @@
           }
           getContext().debug( compileOptions.toString() );
   
  -        StringBuffer niceSourceList = new StringBuffer( "Files to be compiled:" + StringUtil.LINE_SEPARATOR );
  +        StringBuffer niceSourceList = new StringBuffer( "Files to be compiled:" + System.getProperty( "line.separator" ) );
   
           for( int i = 0; i < compileList.size(); i++ )
           {
               niceSourceList.append( "    " );
               niceSourceList.append( compileList.get( i ).toString() );
  -            niceSourceList.append( StringUtil.LINE_SEPARATOR );
  +            niceSourceList.append( System.getProperty( "line.separator" ) );
           }
   
           getContext().debug( niceSourceList.toString() );
  
  
  
  1.2       +10 -11    jakarta-ant-myrmidon/framework/src/todo/org/apache/tools/todo/taskdefs/javac/DefaultCompilerAdapter.java
  
  Index: DefaultCompilerAdapter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/framework/src/todo/org/apache/tools/todo/taskdefs/javac/DefaultCompilerAdapter.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DefaultCompilerAdapter.java	14 Apr 2002 09:31:49 -0000	1.1
  +++ DefaultCompilerAdapter.java	20 Apr 2002 12:53:38 -0000	1.2
  @@ -11,18 +11,17 @@
   import java.io.FileWriter;
   import java.io.IOException;
   import java.io.PrintWriter;
  +import org.apache.aut.nativelib.PathUtil;
   import org.apache.avalon.excalibur.io.IOUtil;
  -import org.apache.avalon.excalibur.util.StringUtil;
   import org.apache.myrmidon.api.TaskContext;
   import org.apache.myrmidon.api.TaskException;
  -import org.apache.myrmidon.framework.nativelib.Execute;
   import org.apache.myrmidon.framework.FileSet;
  -import org.apache.myrmidon.framework.nativelib.Commandline;
  -import org.apache.myrmidon.framework.nativelib.ArgumentList;
  -import org.apache.myrmidon.framework.file.Path;
   import org.apache.myrmidon.framework.file.FileListUtil;
  +import org.apache.myrmidon.framework.file.Path;
  +import org.apache.myrmidon.framework.nativelib.ArgumentList;
  +import org.apache.myrmidon.framework.nativelib.Commandline;
  +import org.apache.myrmidon.framework.nativelib.Execute;
   import org.apache.tools.todo.util.FileUtils;
  -import org.apache.aut.nativelib.PathUtil;
   
   /**
    * This is the default implementation for the CompilerAdapter interface.
  @@ -132,7 +131,7 @@
        * @return Description of the Returned Value
        */
       protected ArgumentList setupJavacCommandlineSwitches( ArgumentList cmd,
  -                                                         boolean useDebugLevel )
  +                                                          boolean useDebugLevel )
           throws TaskException
       {
           Path classpath = new Path();
  @@ -346,7 +345,7 @@
                       final PrintWriter out = new PrintWriter( fout );
                       for( int i = 0; i < m_compileList.length; i++ )
                       {
  -                        File file = m_compileList[i ];
  +                        File file = m_compileList[ i ];
                           out.println( file.getAbsolutePath() );
                       }
                       out.close();
  @@ -396,12 +395,12 @@
           }
           niceSourceList.append( " to be compiled:" );
   
  -        niceSourceList.append( StringUtil.LINE_SEPARATOR );
  +        niceSourceList.append( System.getProperty( "line.separator" ) );
   
           for( int i = 0; i < m_compileList.length; i++ )
           {
               String arg = m_compileList[ i ].getAbsolutePath();
  -            niceSourceList.append( "    " + arg + StringUtil.LINE_SEPARATOR );
  +            niceSourceList.append( "    " + arg + System.getProperty( "line.separator" ) );
           }
   
           getTaskContext().debug( niceSourceList.toString() );
  @@ -414,7 +413,7 @@
       {
           for( int i = 0; i < m_compileList.length; i++ )
           {
  -            File file = m_compileList[i ];
  +            File file = m_compileList[ i ];
               cmd.addArgument( file );
           }
       }
  
  
  
  1.2       +3 -5      jakarta-ant-myrmidon/framework/src/todo/org/apache/tools/todo/taskdefs/jsp/compilers/DefaultCompilerAdapter.java
  
  Index: DefaultCompilerAdapter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/framework/src/todo/org/apache/tools/todo/taskdefs/jsp/compilers/DefaultCompilerAdapter.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DefaultCompilerAdapter.java	14 Apr 2002 09:31:50 -0000	1.1
  +++ DefaultCompilerAdapter.java	20 Apr 2002 12:53:38 -0000	1.2
  @@ -9,12 +9,10 @@
   
   import java.util.ArrayList;
   import java.util.Iterator;
  -import org.apache.avalon.excalibur.util.StringUtil;
   import org.apache.myrmidon.api.TaskContext;
   import org.apache.myrmidon.api.TaskException;
  -import org.apache.tools.todo.taskdefs.jsp.JspC;
  -import org.apache.myrmidon.framework.nativelib.Commandline;
   import org.apache.myrmidon.framework.nativelib.ArgumentList;
  +import org.apache.tools.todo.taskdefs.jsp.JspC;
   import org.apache.tools.todo.util.FileUtils;
   
   /**
  @@ -75,14 +73,14 @@
           }
           niceSourceList.append( " to be compiled:" );
   
  -        niceSourceList.append( StringUtil.LINE_SEPARATOR );
  +        niceSourceList.append( System.getProperty( "line.separator" ) );
   
           Iterator enum = compileList.iterator();
           while( enum.hasNext() )
           {
               String arg = (String)enum.next();
               cmd.addArgument( arg );
  -            niceSourceList.append( "    " + arg + StringUtil.LINE_SEPARATOR );
  +            niceSourceList.append( "    " + arg + System.getProperty( "line.separator" ) );
           }
   
           getTaskContext().debug( niceSourceList.toString() );
  
  
  
  1.2       +7 -8      jakarta-ant-myrmidon/framework/src/todo/org/apache/tools/todo/taskdefs/junit/BriefJUnitResultFormatter.java
  
  Index: BriefJUnitResultFormatter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/framework/src/todo/org/apache/tools/todo/taskdefs/junit/BriefJUnitResultFormatter.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- BriefJUnitResultFormatter.java	14 Apr 2002 09:31:50 -0000	1.1
  +++ BriefJUnitResultFormatter.java	20 Apr 2002 12:53:38 -0000	1.2
  @@ -9,7 +9,6 @@
   
   import junit.framework.AssertionFailedError;
   import junit.framework.Test;
  -import org.apache.avalon.excalibur.util.StringUtil;
   import org.apache.myrmidon.api.TaskException;
   
   /**
  @@ -142,7 +141,7 @@
       {
           final StringBuffer sb = new StringBuffer( "Testsuite: " );
           sb.append( suite.getName() );
  -        sb.append( StringUtil.LINE_SEPARATOR );
  +        sb.append( System.getProperty( "line.separator" ) );
           sb.append( "Tests run: " );
           sb.append( suite.runCount() );
           sb.append( ", Failures: " );
  @@ -152,26 +151,26 @@
           sb.append( ", Time elapsed: " );
           sb.append( m_numberFormat.format( suite.getRunTime() / 1000.0 ) );
           sb.append( " sec" );
  -        sb.append( StringUtil.LINE_SEPARATOR );
  -        sb.append( StringUtil.LINE_SEPARATOR );
  +        sb.append( System.getProperty( "line.separator" ) );
  +        sb.append( System.getProperty( "line.separator" ) );
   
           // append the err and output streams to the log
           if( systemOutput != null && systemOutput.length() > 0 )
           {
               sb.append( "------------- Standard Output ---------------" )
  -                .append( StringUtil.LINE_SEPARATOR )
  +                .append( System.getProperty( "line.separator" ) )
                   .append( systemOutput )
                   .append( "------------- ---------------- ---------------" )
  -                .append( StringUtil.LINE_SEPARATOR );
  +                .append( System.getProperty( "line.separator" ) );
           }
   
           if( systemError != null && systemError.length() > 0 )
           {
               sb.append( "------------- Standard Error -----------------" )
  -                .append( StringUtil.LINE_SEPARATOR )
  +                .append( System.getProperty( "line.separator" ) )
                   .append( systemError )
                   .append( "------------- ---------------- ---------------" )
  -                .append( StringUtil.LINE_SEPARATOR );
  +                .append( System.getProperty( "line.separator" ) );
           }
   
           if( output() != null )
  
  
  
  1.2       +2 -3      jakarta-ant-myrmidon/framework/src/todo/org/apache/tools/todo/taskdefs/junit/DOMElementWriter.java
  
  Index: DOMElementWriter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/framework/src/todo/org/apache/tools/todo/taskdefs/junit/DOMElementWriter.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DOMElementWriter.java	14 Apr 2002 09:31:50 -0000	1.1
  +++ DOMElementWriter.java	20 Apr 2002 12:53:38 -0000	1.2
  @@ -9,7 +9,6 @@
   
   import java.io.IOException;
   import java.io.Writer;
  -import org.apache.avalon.excalibur.util.StringUtil;
   import org.w3c.dom.Attr;
   import org.w3c.dom.Element;
   import org.w3c.dom.NamedNodeMap;
  @@ -186,7 +185,7 @@
                   case Node.ELEMENT_NODE:
                       if( !hasChildren )
                       {
  -                        out.write( StringUtil.LINE_SEPARATOR );
  +                        out.write( System.getProperty( "line.separator" ) );
                           hasChildren = true;
                       }
                       write( (Element)child, out, indent + 1, indentWith );
  @@ -233,7 +232,7 @@
           out.write( "</" );
           out.write( element.getTagName() );
           out.write( ">" );
  -        out.write( StringUtil.LINE_SEPARATOR );
  +        out.write( System.getProperty( "line.separator" ) );
           out.flush();
       }
   }
  
  
  
  1.2       +7 -8      jakarta-ant-myrmidon/framework/src/todo/org/apache/tools/todo/taskdefs/junit/PlainJUnitResultFormatter.java
  
  Index: PlainJUnitResultFormatter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/framework/src/todo/org/apache/tools/todo/taskdefs/junit/PlainJUnitResultFormatter.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- PlainJUnitResultFormatter.java	14 Apr 2002 09:31:50 -0000	1.1
  +++ PlainJUnitResultFormatter.java	20 Apr 2002 12:53:38 -0000	1.2
  @@ -15,7 +15,6 @@
   import java.util.Hashtable;
   import junit.framework.AssertionFailedError;
   import junit.framework.Test;
  -import org.apache.avalon.excalibur.util.StringUtil;
   import org.apache.myrmidon.api.TaskException;
   
   /**
  @@ -148,7 +147,7 @@
       {
           StringBuffer sb = new StringBuffer( "Testsuite: " );
           sb.append( suite.getName() );
  -        sb.append( StringUtil.LINE_SEPARATOR );
  +        sb.append( System.getProperty( "line.separator" ) );
           sb.append( "Tests run: " );
           sb.append( suite.runCount() );
           sb.append( ", Failures: " );
  @@ -158,28 +157,28 @@
           sb.append( ", Time elapsed: " );
           sb.append( nf.format( suite.getRunTime() / 1000.0 ) );
           sb.append( " sec" );
  -        sb.append( StringUtil.LINE_SEPARATOR );
  +        sb.append( System.getProperty( "line.separator" ) );
   
           // append the err and output streams to the log
           if( systemOutput != null && systemOutput.length() > 0 )
           {
               sb.append( "------------- Standard Output ---------------" )
  -                .append( StringUtil.LINE_SEPARATOR )
  +                .append( System.getProperty( "line.separator" ) )
                   .append( systemOutput )
                   .append( "------------- ---------------- ---------------" )
  -                .append( StringUtil.LINE_SEPARATOR );
  +                .append( System.getProperty( "line.separator" ) );
           }
   
           if( systemError != null && systemError.length() > 0 )
           {
               sb.append( "------------- Standard Error -----------------" )
  -                .append( StringUtil.LINE_SEPARATOR )
  +                .append( System.getProperty( "line.separator" ) )
                   .append( systemError )
                   .append( "------------- ---------------- ---------------" )
  -                .append( StringUtil.LINE_SEPARATOR );
  +                .append( System.getProperty( "line.separator" ) );
           }
   
  -        sb.append( StringUtil.LINE_SEPARATOR );
  +        sb.append( System.getProperty( "line.separator" ) );
   
           if( out != null )
           {
  
  
  
  1.2       +5 -6      jakarta-ant-myrmidon/framework/src/todo/org/apache/tools/todo/taskdefs/junit/SummaryJUnitResultFormatter.java
  
  Index: SummaryJUnitResultFormatter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/framework/src/todo/org/apache/tools/todo/taskdefs/junit/SummaryJUnitResultFormatter.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- SummaryJUnitResultFormatter.java	14 Apr 2002 09:31:50 -0000	1.1
  +++ SummaryJUnitResultFormatter.java	20 Apr 2002 12:53:38 -0000	1.2
  @@ -12,7 +12,6 @@
   import java.text.NumberFormat;
   import junit.framework.AssertionFailedError;
   import junit.framework.Test;
  -import org.apache.avalon.excalibur.util.StringUtil;
   import org.apache.myrmidon.api.TaskException;
   
   /**
  @@ -129,20 +128,20 @@
           sb.append( ", Time elapsed: " );
           sb.append( nf.format( suite.getRunTime() / 1000.0 ) );
           sb.append( " sec" );
  -        sb.append( StringUtil.LINE_SEPARATOR );
  +        sb.append( System.getProperty( "line.separator" ) );
   
           if( withOutAndErr )
           {
               if( systemOutput != null && systemOutput.length() > 0 )
               {
  -                sb.append( "Output:" ).append( StringUtil.LINE_SEPARATOR ).append( systemOutput )
  -                    .append( StringUtil.LINE_SEPARATOR );
  +                sb.append( "Output:" ).append( System.getProperty( "line.separator" ) ).append( systemOutput )
  +                    .append( System.getProperty( "line.separator" ) );
               }
   
               if( systemError != null && systemError.length() > 0 )
               {
  -                sb.append( "Error: " ).append( StringUtil.LINE_SEPARATOR ).append( systemError )
  -                    .append( StringUtil.LINE_SEPARATOR );
  +                sb.append( "Error: " ).append( System.getProperty( "line.separator" ) ).append( systemError )
  +                    .append( System.getProperty( "line.separator" ) );
               }
           }
   
  
  
  
  1.2       +2 -8      jakarta-ant-myrmidon/framework/src/todo/org/apache/tools/todo/taskdefs/text/Replace.java
  
  Index: Replace.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/framework/src/todo/org/apache/tools/todo/taskdefs/text/Replace.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Replace.java	14 Apr 2002 09:31:52 -0000	1.1
  +++ Replace.java	20 Apr 2002 12:53:38 -0000	1.2
  @@ -23,12 +23,8 @@
   import java.util.ArrayList;
   import java.util.Properties;
   import org.apache.avalon.excalibur.io.IOUtil;
  -import org.apache.avalon.excalibur.util.StringUtil;
   import org.apache.myrmidon.api.TaskException;
  -import org.apache.myrmidon.api.AbstractTask;
  -import org.apache.myrmidon.api.TaskContext;
   import org.apache.tools.todo.taskdefs.MatchingTask;
  -import org.apache.tools.todo.taskdefs.text.NestedString;
   import org.apache.tools.todo.types.DirectoryScanner;
   
   /**
  @@ -327,7 +323,6 @@
               int fileLengthInBytes = (int)( src.length() );
               StringBuffer tmpBuf = new StringBuffer( fileLengthInBytes );
               int readChar = 0;
  -            int totread = 0;
               while( true )
               {
                   readChar = br.read();
  @@ -336,7 +331,6 @@
                       break;
                   }
                   tmpBuf.append( (char)readChar );
  -                totread++;
               }
   
               // create a String so we can use indexOf
  @@ -350,8 +344,8 @@
                   // line separators in values and tokens are "\n"
                   // in order to compare with the file contents, replace them
                   // as needed
  -                final String val = stringReplace( m_value.getText(), "\n", StringUtil.LINE_SEPARATOR );
  -                final String tok = stringReplace( m_token.getText(), "\n", StringUtil.LINE_SEPARATOR );
  +                final String val = stringReplace( m_value.getText(), "\n", System.getProperty( "line.separator" ) );
  +                final String tok = stringReplace( m_token.getText(), "\n", System.getProperty( "line.separator" ) );
   
                   // for each found token, replace with value
                   getContext().debug( "Replacing in " + src.getPath() + ": " + m_token.getText() + " --> " + m_value.getText() );
  
  
  

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message