conor       2003/04/14 07:47:42

  Modified:    src/main/org/apache/tools/ant Diagnostics.java
                        DirectoryScanner.java IntrospectionHelper.java
                        Location.java ProjectComponent.java
                        ProjectHelper.java PropertyHelper.java Task.java
                        UnknownElement.java XmlLogger.java
  Log:
  More cleanup
  
  Revision  Changes    Path
  1.9       +29 -22    ant/src/main/org/apache/tools/ant/Diagnostics.java
  
  Index: Diagnostics.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/Diagnostics.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -w -u -r1.8 -r1.9
  --- Diagnostics.java  31 Mar 2003 13:46:18 -0000      1.8
  +++ Diagnostics.java  14 Apr 2003 14:47:41 -0000      1.9
  @@ -77,6 +77,9 @@
    */
   public final class Diagnostics {
   
  +    private static final String TEST_CLASS 
  +        = "org.apache.tools.ant.taskdefs.optional.Test";
  +    
       /** utility class */
       private Diagnostics(){
       }
  @@ -88,7 +91,7 @@
        */
       public static boolean isOptionalAvailable() {
           try {
  -            Class.forName("org.apache.tools.ant.taskdefs.optional.Test");
  +            Class.forName(TEST_CLASS);
           } catch (ClassNotFoundException e){
               return false;
           }
  @@ -102,13 +105,15 @@
        */
       public static void validateVersion() throws BuildException {
           try {
  -            Class optional = 
Class.forName("org.apache.tools.ant.taskdefs.optional.Test");
  +            Class optional 
  +                = 
Class.forName("org.apache.tools.ant.taskdefs.optional.Test");
               String coreVersion = getImplementationVersion(Main.class);
               String optionalVersion = getImplementationVersion(optional);
               
               if (coreVersion != null && !coreVersion.equals(optionalVersion) 
){
                   throw new BuildException(
  -                        "Invalid implementation version between Ant core and 
Ant optional tasks.\n" +
  +                        "Invalid implementation version between Ant core and 
" 
  +                        + "Ant optional tasks.\n" +
                           " core    : " + coreVersion + "\n" +
                           " optional: " + optionalVersion);
               }
  @@ -253,7 +258,8 @@
           try {
               optional = Class.forName(
                       "org.apache.tools.ant.taskdefs.optional.Test");
  -            out.println("optional tasks : " + 
getImplementationVersion(optional));
  +            out.println("optional tasks : " 
  +                + getImplementationVersion(optional));
           } catch (ClassNotFoundException e){
               out.println("optional tasks : not available");
           }
  @@ -331,7 +337,8 @@
           Throwable error = null;
           try {
               Class which = Class.forName("org.apache.env.Which");
  -            Method method = which.getMethod("main", new Class[]{ 
String[].class });
  +            Method method 
  +                = which.getMethod("main", new Class[]{ String[].class });
               method.invoke(null, new Object[]{new String[]{}});
           } catch (ClassNotFoundException e) {
               out.println("Not available.");
  
  
  
  1.39      +7 -4      ant/src/main/org/apache/tools/ant/DirectoryScanner.java
  
  Index: DirectoryScanner.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/DirectoryScanner.java,v
  retrieving revision 1.38
  retrieving revision 1.39
  diff -u -w -u -r1.38 -r1.39
  --- DirectoryScanner.java     12 Feb 2003 09:05:03 -0000      1.38
  +++ DirectoryScanner.java     14 Apr 2003 14:47:41 -0000      1.39
  @@ -152,7 +152,8 @@
    * @author <a href="mailto:[EMAIL PROTECTED]">Bruce Atherton</a>
    * @author <a href="mailto:[EMAIL PROTECTED]">Antoine Levy-Lambert</a>
    */
  -public class DirectoryScanner implements FileScanner, SelectorScanner, 
ResourceFactory {
  +public class DirectoryScanner 
  +       implements FileScanner, SelectorScanner, ResourceFactory {
   
       /**
        * Patterns which should be excluded by default.
  @@ -949,8 +950,10 @@
       }
   
       /**
  +     * Get the named resource
        * @param name path name of the file relative to the dir attribute.
        *
  +     * @return the resource with the given name.
        * @since Ant 1.5.2
        */
       public Resource getResource(String name) {
  
  
  
  1.53      +2 -1      
ant/src/main/org/apache/tools/ant/IntrospectionHelper.java
  
  Index: IntrospectionHelper.java
  ===================================================================
  RCS file: 
/home/cvs/ant/src/main/org/apache/tools/ant/IntrospectionHelper.java,v
  retrieving revision 1.52
  retrieving revision 1.53
  diff -u -w -u -r1.52 -r1.53
  --- IntrospectionHelper.java  14 Apr 2003 11:58:03 -0000      1.52
  +++ IntrospectionHelper.java  14 Apr 2003 14:47:41 -0000      1.53
  @@ -257,7 +257,8 @@
                           particular order.
                       */
                   }
  -                AttributeSetter as = createAttributeSetter(m, args[0], 
propName);
  +                AttributeSetter as 
  +                    = createAttributeSetter(m, args[0], propName);
                   if (as != null) {
                       attributeTypes.put(propName, args[0]);
                       attributeSetters.put(propName, as);
  
  
  
  1.13      +2 -0      ant/src/main/org/apache/tools/ant/Location.java
  
  Index: Location.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/Location.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -w -u -r1.12 -r1.13
  --- Location.java     31 Mar 2003 15:08:37 -0000      1.12
  +++ Location.java     14 Apr 2003 14:47:41 -0000      1.13
  @@ -62,6 +62,8 @@
    * Stores the location of a piece of text within a file (file name,
    * line number and column number). Note that the column number is
    * currently ignored.
  + *
  + * @author Matt Foemmel
    */
   public class Location implements Serializable {
       
  
  
  
  1.8       +3 -2      ant/src/main/org/apache/tools/ant/ProjectComponent.java
  
  Index: ProjectComponent.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/ProjectComponent.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -w -u -r1.7 -r1.8
  --- ProjectComponent.java     10 Feb 2003 14:13:30 -0000      1.7
  +++ ProjectComponent.java     14 Apr 2003 14:47:41 -0000      1.8
  @@ -119,8 +119,9 @@
               // 'reasonable' default, if the component is used without
               // a Project ( for example as a standalone Bean ).
               // Most ant components can be used this way.
  -            if( msgLevel >= Project.MSG_INFO )
  +            if (msgLevel >= Project.MSG_INFO) {
                   System.err.println( msg );
  +            }
           }
       }
   }
  
  
  
  1.95      +5 -9      ant/src/main/org/apache/tools/ant/ProjectHelper.java
  
  Index: ProjectHelper.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/ProjectHelper.java,v
  retrieving revision 1.94
  retrieving revision 1.95
  diff -u -w -u -r1.94 -r1.95
  --- ProjectHelper.java        10 Feb 2003 14:13:30 -0000      1.94
  +++ ProjectHelper.java        14 Apr 2003 14:47:41 -0000      1.95
  @@ -58,14 +58,12 @@
   import java.io.File;
   import java.io.InputStream;
   import java.io.InputStreamReader;
  -import java.util.Enumeration;
   import java.util.Hashtable;
   import java.util.Locale;
   import java.util.Vector;
   import org.apache.tools.ant.helper.ProjectHelper2;
   import org.apache.tools.ant.util.LoaderUtils;
   import org.xml.sax.AttributeList;
  -import org.xml.sax.Attributes;
   
   /**
    * Configures a Project (complete with Targets and Tasks) based on
  @@ -464,8 +462,7 @@
        * @deprecated Use PropertyHelper
        */
        public static String replaceProperties(Project project, String value,
  -         Hashtable keys) throws BuildException
  -    {
  +         Hashtable keys) throws BuildException {
           PropertyHelper ph=PropertyHelper.getPropertyHelper(project);
           return ph.replaceProperties( null, value, keys);
       }
  @@ -490,8 +487,7 @@
        */
       public static void parsePropertyString(String value, Vector fragments,
                                              Vector propertyRefs)
  -        throws BuildException
  -    {
  +        throws BuildException {
           PropertyHelper.parsePropertyStringDefault(value, fragments,
                   propertyRefs);
       }
  
  
  
  1.5       +3 -7      ant/src/main/org/apache/tools/ant/PropertyHelper.java
  
  Index: PropertyHelper.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/PropertyHelper.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -w -u -r1.4 -r1.5
  --- PropertyHelper.java       10 Feb 2003 14:13:30 -0000      1.4
  +++ PropertyHelper.java       14 Apr 2003 14:47:41 -0000      1.5
  @@ -54,14 +54,10 @@
   
   package org.apache.tools.ant;
   
  -import org.apache.tools.ant.helper.*;
  +import java.util.Hashtable;
  +import java.util.Vector;
  +import java.util.Enumeration;
   
  -import java.util.*;
  -
  -import org.xml.sax.AttributeList;
  -import org.xml.sax.Attributes;
  -import org.xml.sax.helpers.AttributeListImpl;
  -import org.xml.sax.helpers.AttributesImpl;
   
   /* ISSUES:
    - ns param. It could be used to provide "namespaces" for properties, which
  
  
  
  1.43      +1 -0      ant/src/main/org/apache/tools/ant/Task.java
  
  Index: Task.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/Task.java,v
  retrieving revision 1.42
  retrieving revision 1.43
  diff -u -w -u -r1.42 -r1.43
  --- Task.java 6 Apr 2003 09:30:56 -0000       1.42
  +++ Task.java 14 Apr 2003 14:47:41 -0000      1.43
  @@ -64,6 +64,7 @@
    * using this class directly for construction.
    *
    * @see Project#createTask
  + * @author James Duncan Davidson
    */
   public abstract class Task extends ProjectComponent {
       /**
  
  
  
  1.46      +6 -0      ant/src/main/org/apache/tools/ant/UnknownElement.java
  
  Index: UnknownElement.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/UnknownElement.java,v
  retrieving revision 1.45
  retrieving revision 1.46
  diff -u -w -u -r1.45 -r1.46
  --- UnknownElement.java       6 Apr 2003 09:30:56 -0000       1.45
  +++ UnknownElement.java       14 Apr 2003 14:47:42 -0000      1.46
  @@ -104,6 +104,12 @@
           return elementName;
       }
   
  +    /**
  +     * Get the RuntimeConfigurable instance for this UnknownElement, 
containing
  +     * the configuration information.
  +     *
  +     * @return the configuration info.
  +     */
       public RuntimeConfigurable getWrapper() {
           return wrapper;
       }
  
  
  
  1.35      +8 -1      ant/src/main/org/apache/tools/ant/XmlLogger.java
  
  Index: XmlLogger.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/XmlLogger.java,v
  retrieving revision 1.34
  retrieving revision 1.35
  diff -u -w -u -r1.34 -r1.35
  --- XmlLogger.java    10 Feb 2003 14:13:30 -0000      1.34
  +++ XmlLogger.java    14 Apr 2003 14:47:42 -0000      1.35
  @@ -84,6 +84,7 @@
    * if executed in parallel.
    *
    * @see Project#addBuildListener(BuildListener)
  + * @author Matt Foemmel
    */
   public class XmlLogger implements BuildLogger {
   
  @@ -288,7 +289,8 @@
                   TimedElement poppedStack = (TimedElement) threadStack.pop();
                   if (poppedStack != targetElement) {
                       throw new RuntimeException("Mismatch - popped element = "
  -                            + poppedStack.element + " finished target 
element = "
  +                            + poppedStack.element 
  +                            + " finished target element = "
                               + targetElement.element);
                   }
                   if (!threadStack.empty()) {
  @@ -477,6 +479,9 @@
   
       /**
        * Ignore emacs mode, as it has no meaning in XML format
  +     *
  +     * @param emacsMode true if no loggher should produce emacs compatible 
  +     *        output
        */
       public void setEmacsMode(boolean emacsMode) {
       }
  @@ -485,6 +490,8 @@
        * Ignore error print stream. All output will be written to
        * either the XML log file or the PrintStream provided to
        * setOutputPrintStream
  +     *
  +     * @param err the stream we are going to ignore.
        */
       public void setErrorPrintStream(PrintStream err) {
       }
  
  
  

Reply via email to