ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sbaill...@apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant/util/regexp JakartaOroMatcher.java JakartaOroRegexp.java JakartaRegexpMatcher.java JakartaRegexpRegexp.java Jdk14RegexpRegexp.java
Date Sun, 28 Oct 2001 21:27:20 GMT
sbailliez    01/10/28 13:27:20

  Modified:    src/main/org/apache/tools/ant/types CommandlineJava.java
                        Description.java FileList.java FilterSet.java
                        FilterSetCollection.java Mapper.java Path.java
                        PatternSet.java RegularExpression.java
                        Substitution.java ZipFileSet.java
               src/main/org/apache/tools/ant/util DOMElementWriter.java
                        FileUtils.java RegexpPatternMapper.java
               src/main/org/apache/tools/ant/util/regexp
                        JakartaOroMatcher.java JakartaOroRegexp.java
                        JakartaRegexpMatcher.java JakartaRegexpRegexp.java
                        Jdk14RegexpRegexp.java
  Log:
  Code clean up:
   - removed useless/duplicate imports
   - added explicit imports rather than *
   - changed specifiers order to be conform to JLS.
  
  Revision  Changes    Path
  1.18      +3 -1      jakarta-ant/src/main/org/apache/tools/ant/types/CommandlineJava.java
  
  Index: CommandlineJava.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/types/CommandlineJava.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- CommandlineJava.java	2001/08/30 13:26:38	1.17
  +++ CommandlineJava.java	2001/10/28 21:27:19	1.18
  @@ -54,7 +54,9 @@
   
   package org.apache.tools.ant.types;
   
  -import java.util.*;
  +import java.util.Properties;
  +import java.util.Enumeration;
  +import java.util.Vector;
   import org.apache.tools.ant.Project;
   import org.apache.tools.ant.BuildException;
   
  
  
  
  1.3       +2 -2      jakarta-ant/src/main/org/apache/tools/ant/types/Description.java
  
  Index: Description.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/types/Description.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Description.java	2001/08/30 13:26:38	1.2
  +++ Description.java	2001/10/28 21:27:19	1.3
  @@ -54,8 +54,8 @@
   
   package org.apache.tools.ant.types;
   
  -import org.apache.tools.ant.Project;
   
  +
   /**
    * Description is used to provide a project-wide description element
    * (that is, a description that applies to a buildfile as a whole).
  @@ -67,7 +67,7 @@
    * overwrite the first.
    *
    * @author <a href="mailto:cstrong@arielpartners.com">Craeg Strong</a>
  - * @version $Revision: 1.2 $ $Date: 2001/08/30 13:26:38 $
  + * @version $Revision: 1.3 $ $Date: 2001/10/28 21:27:19 $
    */
   public class Description extends DataType {
   
  
  
  
  1.2       +2 -2      jakarta-ant/src/main/org/apache/tools/ant/types/FileList.java
  
  Index: FileList.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/types/FileList.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- FileList.java	2001/08/06 14:32:46	1.1
  +++ FileList.java	2001/10/28 21:27:19	1.2
  @@ -60,7 +60,7 @@
   import java.io.File;
   
   import java.util.StringTokenizer;
  -import java.util.Enumeration;
  +
   import java.util.Stack;
   import java.util.Vector;
   
  @@ -72,7 +72,7 @@
    * exists in the file system.
    * 
    * @author <a href="mailto:cstrong@arielpartners.com">Craeg Strong</a>
  - * @version $Revision: 1.1 $ $Date: 2001/08/06 14:32:46 $
  + * @version $Revision: 1.2 $ $Date: 2001/10/28 21:27:19 $
    */
   public class FileList extends DataType {
       
  
  
  
  1.5       +3 -3      jakarta-ant/src/main/org/apache/tools/ant/types/FilterSet.java
  
  Index: FilterSet.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/types/FilterSet.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- FilterSet.java	2001/09/30 13:21:54	1.4
  +++ FilterSet.java	2001/10/28 21:27:19	1.5
  @@ -67,8 +67,8 @@
   // ant classes
   import org.apache.tools.ant.BuildException;
   import org.apache.tools.ant.Project;
  -import org.apache.tools.ant.Task;
   
  +
   /**
    * A set of filters to be applied to something.
    *
  @@ -171,10 +171,10 @@
       }
       
       /** The default token start string */
  -    public static final String DEFAULT_TOKEN_START = "@";
  +    public final static String DEFAULT_TOKEN_START = "@";
       
       /** The default token end string */
  -    public static final String DEFAULT_TOKEN_END = "@";
  +    public final static String DEFAULT_TOKEN_END = "@";
       
       private String startOfToken = DEFAULT_TOKEN_START;
       private String endOfToken = DEFAULT_TOKEN_END;
  
  
  
  1.4       +8 -8      jakarta-ant/src/main/org/apache/tools/ant/types/FilterSetCollection.java
  
  Index: FilterSetCollection.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/types/FilterSetCollection.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- FilterSetCollection.java	2001/09/30 13:21:54	1.3
  +++ FilterSetCollection.java	2001/10/28 21:27:19	1.4
  @@ -54,20 +54,20 @@
   package org.apache.tools.ant.types;
   
   // java io classes
  -import java.io.File;
  -import java.io.FileInputStream;
  -import java.io.IOException;
   
  +
  +
  +
   // java util classes
   import java.util.Enumeration;
  -import java.util.Hashtable;
  -import java.util.Properties;
  +
  +
   import java.util.Vector;
   
   // ant classes
  -import org.apache.tools.ant.BuildException;
  -import org.apache.tools.ant.Project;
  -import org.apache.tools.ant.Task;
  +
  +
  +
   
   /**
    * A FilterSetCollection is a collection of filtersets each of which may have
  
  
  
  1.6       +1 -1      jakarta-ant/src/main/org/apache/tools/ant/types/Mapper.java
  
  Index: Mapper.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/types/Mapper.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Mapper.java	2001/05/10 15:23:00	1.5
  +++ Mapper.java	2001/10/28 21:27:19	1.6
  @@ -57,7 +57,7 @@
   import org.apache.tools.ant.AntClassLoader;
   import org.apache.tools.ant.BuildException;
   import org.apache.tools.ant.Project;
  -import org.apache.tools.ant.util.*;
  +import org.apache.tools.ant.util.FileNameMapper;
   
   import java.util.Properties;
   import java.util.Stack;
  
  
  
  1.21      +4 -4      jakarta-ant/src/main/org/apache/tools/ant/types/Path.java
  
  Index: Path.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/types/Path.java,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- Path.java	2001/08/03 16:38:21	1.20
  +++ Path.java	2001/10/28 21:27:19	1.21
  @@ -60,13 +60,13 @@
   import org.apache.tools.ant.PathTokenizer;
   
   import java.io.File;
  -import java.io.IOException;
  +
   import java.util.Enumeration;
  -import java.util.StringTokenizer;
  +
   import java.util.Stack;
   import java.util.Vector;
  -import java.text.CharacterIterator;
  -import java.text.StringCharacterIterator;
  +
  +
   
   /**
    * This object represents a path as used by CLASSPATH or PATH
  
  
  
  1.13      +4 -1      jakarta-ant/src/main/org/apache/tools/ant/types/PatternSet.java
  
  Index: PatternSet.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/types/PatternSet.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- PatternSet.java	2001/10/06 01:07:20	1.12
  +++ PatternSet.java	2001/10/28 21:27:19	1.13
  @@ -58,7 +58,10 @@
   import org.apache.tools.ant.ProjectHelper;
   import org.apache.tools.ant.BuildException;
   
  -import java.io.*;
  +import java.io.File;
  +import java.io.BufferedReader;
  +import java.io.FileReader;
  +import java.io.IOException;
   import java.util.Enumeration;
   import java.util.Stack;
   import java.util.StringTokenizer;
  
  
  
  1.2       +3 -3      jakarta-ant/src/main/org/apache/tools/ant/types/RegularExpression.java
  
  Index: RegularExpression.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/types/RegularExpression.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- RegularExpression.java	2001/10/25 15:03:39	1.1
  +++ RegularExpression.java	2001/10/28 21:27:19	1.2
  @@ -53,7 +53,7 @@
    */
   package org.apache.tools.ant.types;
   
  -import java.util.Hashtable;
  +
   import java.util.Stack;
   import org.apache.tools.ant.BuildException;
   import org.apache.tools.ant.Project;
  @@ -96,10 +96,10 @@
    */
   public class RegularExpression extends DataType
   {
  -    public static final String DATA_TYPE_NAME = "regularexpression";
  +    public final static String DATA_TYPE_NAME = "regularexpression";
   
       // The regular expression factory
  -    private static final RegexpFactory factory = new RegexpFactory();
  +    private final static RegexpFactory factory = new RegexpFactory();
   
       private Regexp regexp;
   
  
  
  
  1.2       +2 -2      jakarta-ant/src/main/org/apache/tools/ant/types/Substitution.java
  
  Index: Substitution.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/types/Substitution.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Substitution.java	2001/10/25 15:03:39	1.1
  +++ Substitution.java	2001/10/28 21:27:19	1.2
  @@ -53,7 +53,7 @@
    */
   package org.apache.tools.ant.types;
   
  -import java.util.Hashtable;
  +
   import java.util.Stack;
   import org.apache.tools.ant.BuildException;
   import org.apache.tools.ant.Project;
  @@ -74,7 +74,7 @@
    */
   public class Substitution extends DataType
   {
  -    public static final String DATA_TYPE_NAME = "substitition";
  +    public final static String DATA_TYPE_NAME = "substitition";
   
       private String expression;
   
  
  
  
  1.4       +1 -1      jakarta-ant/src/main/org/apache/tools/ant/types/ZipFileSet.java
  
  Index: ZipFileSet.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/types/ZipFileSet.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ZipFileSet.java	2001/04/02 08:05:57	1.3
  +++ ZipFileSet.java	2001/10/28 21:27:19	1.4
  @@ -54,7 +54,7 @@
   package org.apache.tools.ant.types;
   
   import java.io.File;
  -import java.util.Stack;
  +
   import org.apache.tools.ant.BuildException;
   import org.apache.tools.ant.DirectoryScanner;
   import org.apache.tools.ant.Project;
  
  
  
  1.5       +8 -2      jakarta-ant/src/main/org/apache/tools/ant/util/DOMElementWriter.java
  
  Index: DOMElementWriter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/util/DOMElementWriter.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- DOMElementWriter.java	2001/04/27 12:48:20	1.4
  +++ DOMElementWriter.java	2001/10/28 21:27:20	1.5
  @@ -54,8 +54,14 @@
   
   package org.apache.tools.ant.util;
   
  -import java.io.*;
  -import org.w3c.dom.*;
  +import java.io.IOException;
  +import java.io.Writer;
  +import org.w3c.dom.Element;
  +import org.w3c.dom.NamedNodeMap;
  +import org.w3c.dom.Attr;
  +import org.w3c.dom.NodeList;
  +import org.w3c.dom.Node;
  +import org.w3c.dom.Text;
   
   /**
    * Writes a DOM tree to a given Writer.
  
  
  
  1.7       +8 -1      jakarta-ant/src/main/org/apache/tools/ant/util/FileUtils.java
  
  Index: FileUtils.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/util/FileUtils.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- FileUtils.java	2001/10/18 08:25:16	1.6
  +++ FileUtils.java	2001/10/28 21:27:20	1.7
  @@ -54,7 +54,14 @@
   
   package org.apache.tools.ant.util;
   
  -import java.io.*;
  +import java.io.IOException;
  +import java.io.File;
  +import java.io.BufferedReader;
  +import java.io.FileReader;
  +import java.io.BufferedWriter;
  +import java.io.FileWriter;
  +import java.io.FileInputStream;
  +import java.io.FileOutputStream;
   import java.lang.reflect.Method;
   import java.util.StringTokenizer;
   import java.util.Stack;
  
  
  
  1.4       +1 -1      jakarta-ant/src/main/org/apache/tools/ant/util/RegexpPatternMapper.java
  
  Index: RegexpPatternMapper.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/util/RegexpPatternMapper.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- RegexpPatternMapper.java	2000/11/29 11:50:02	1.3
  +++ RegexpPatternMapper.java	2001/10/28 21:27:20	1.4
  @@ -58,7 +58,7 @@
   import org.apache.tools.ant.util.regexp.RegexpMatcher;
   import org.apache.tools.ant.util.regexp.RegexpMatcherFactory;
   
  -import java.util.Enumeration;
  +
   import java.util.Vector;
   
   /**
  
  
  
  1.3       +2 -2      jakarta-ant/src/main/org/apache/tools/ant/util/regexp/JakartaOroMatcher.java
  
  Index: JakartaOroMatcher.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/util/regexp/JakartaOroMatcher.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- JakartaOroMatcher.java	2001/10/25 15:03:39	1.2
  +++ JakartaOroMatcher.java	2001/10/28 21:27:20	1.3
  @@ -59,8 +59,8 @@
   import org.apache.oro.text.regex.Pattern;
   import org.apache.oro.text.regex.Perl5Compiler;
   import org.apache.oro.text.regex.Perl5Matcher;
  -import org.apache.oro.text.regex.Perl5Pattern;
  -import org.apache.oro.text.regex.Util;
  +
  +
   
   import java.util.Vector;
   
  
  
  
  1.3       +1 -1      jakarta-ant/src/main/org/apache/tools/ant/util/regexp/JakartaOroRegexp.java
  
  Index: JakartaOroRegexp.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/util/regexp/JakartaOroRegexp.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- JakartaOroRegexp.java	2001/10/26 09:36:40	1.2
  +++ JakartaOroRegexp.java	2001/10/28 21:27:20	1.3
  @@ -58,7 +58,7 @@
   import org.apache.oro.text.regex.Substitution;
   import org.apache.oro.text.regex.Util;
   
  -import java.util.Vector;
  +
   
   /***
    * Regular expression implementation using the Jakarta Oro package
  
  
  
  1.4       +2 -1      jakarta-ant/src/main/org/apache/tools/ant/util/regexp/JakartaRegexpMatcher.java
  
  Index: JakartaRegexpMatcher.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/util/regexp/JakartaRegexpMatcher.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- JakartaRegexpMatcher.java	2001/10/25 15:03:39	1.3
  +++ JakartaRegexpMatcher.java	2001/10/28 21:27:20	1.4
  @@ -54,7 +54,8 @@
   
   package org.apache.tools.ant.util.regexp;
   
  -import org.apache.regexp.*;
  +import org.apache.regexp.RE;
  +import org.apache.regexp.RESyntaxException;
   
   import org.apache.tools.ant.BuildException;
   import java.util.Vector;
  
  
  
  1.3       +1 -1      jakarta-ant/src/main/org/apache/tools/ant/util/regexp/JakartaRegexpRegexp.java
  
  Index: JakartaRegexpRegexp.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/util/regexp/JakartaRegexpRegexp.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- JakartaRegexpRegexp.java	2001/10/26 09:36:40	1.2
  +++ JakartaRegexpRegexp.java	2001/10/28 21:27:20	1.3
  @@ -55,7 +55,7 @@
   
   
   import org.apache.tools.ant.BuildException;
  -import org.apache.regexp.*;
  +import org.apache.regexp.RE;
   import java.util.Vector;
   
   /***
  
  
  
  1.3       +2 -2      jakarta-ant/src/main/org/apache/tools/ant/util/regexp/Jdk14RegexpRegexp.java
  
  Index: Jdk14RegexpRegexp.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/util/regexp/Jdk14RegexpRegexp.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Jdk14RegexpRegexp.java	2001/10/26 09:36:40	1.2
  +++ Jdk14RegexpRegexp.java	2001/10/28 21:27:20	1.3
  @@ -55,10 +55,10 @@
   
   
   import org.apache.tools.ant.BuildException;
  -import java.util.Vector;
  +
   import java.util.regex.Matcher;
   import java.util.regex.Pattern;
  -import java.util.regex.PatternSyntaxException;
  +
   
   /***
    * Regular expression implementation using the JDK 1.4 regular expression package
  
  
  

--
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