ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From co...@apache.org
Subject cvs commit: jakarta-ant/proposal/mutant/src/java/common/org/apache/ant/common/util FileUtils.java
Date Fri, 05 Apr 2002 14:31:17 GMT
conor       02/04/05 06:31:17

  Modified:    proposal/mutant/build ant1compat.xml
               proposal/mutant/src/java/antcore/org/apache/ant/antcore/antlib
                        AntLibManager.java
               proposal/mutant/src/java/antcore/org/apache/ant/antcore/execution
                        BuildEventSupport.java ComponentManager.java
                        ExecutionManager.java Frame.java Reflector.java
               proposal/mutant/src/java/antcore/org/apache/ant/antcore/modelparser
                        BuildElementHandler.java
               proposal/mutant/src/java/antlibs/ant1compat/org/apache/tools/ant
                        Project.java ProjectComponent.java Task.java
               proposal/mutant/src/java/antlibs/ant1compat/org/apache/tools/ant/taskdefs
                        Ant.java CallTarget.java
               proposal/mutant/src/java/antlibs/script/org/apache/ant/antlib/script
                        ScriptBase.java
               proposal/mutant/src/java/antlibs/system/org/apache/ant/antlib/system
                        Sequential.java
               proposal/mutant/src/java/bootstrap/org/apache/ant/builder
                        BuildHelper.java
               proposal/mutant/src/java/cli/org/apache/ant/cli
                        Commandline.java
               proposal/mutant/src/java/common/org/apache/ant/common/model
                        ModelElement.java Project.java
               proposal/mutant/src/java/common/org/apache/ant/common/util
                        FileUtils.java
  Log:
  New  checkstyle check - woohoo
  Sync up condition checks with current Ant1
  
  Revision  Changes    Path
  1.13      +29 -25    jakarta-ant/proposal/mutant/build/ant1compat.xml
  
  Index: ant1compat.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/mutant/build/ant1compat.xml,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -w -u -r1.12 -r1.13
  --- ant1compat.xml	3 Apr 2002 01:30:32 -0000	1.12
  +++ ant1compat.xml	5 Apr 2002 14:31:15 -0000	1.13
  @@ -90,10 +90,6 @@
                unless="jdk1.2+" />
       <exclude name="${optional.package}/metamata/*.java" 
                unless="jdk1.2+" />
  -    <exclude name="${optional.type.package}/depend/*.java"
  -             unless="jdk1.2+" />
  -    <exclude name="${util.package}/depend/*.java"
  -             unless="jdk1.2+" />
       <exclude name="${optional.package}/ejb/EjbJar.java"
                unless="jdk1.2+" />
       <exclude name="${optional.package}/ejb/*DeploymentTool.java"
  @@ -103,6 +99,9 @@
       <!-- uses the context classloader -->
       <exclude name="${optional.package}/junit/JUnitClassLoaderTest.java"
                unless="jdk1.2+" />
  +    <!-- use various 1.2 methods -->             
  +    <exclude name="${optional.package}/sitraka/**/*.java"
  +             unless="jdk1.2+" />
     </patternset>
     <patternset id="needs.jdk1.3+">
       <exclude name="${ant.package}/taskdefs/TestProcess.java"
  @@ -136,10 +135,6 @@
     <patternset id="needs.trax">
       <exclude name="${optional.package}/TraXLiaison*.java"
                unless="trax.present" />
  -    <exclude name="${optional.package}/junit/XMLResultAggregator.java"
  -             unless="trax.present" />
  -    <exclude name="${optional.package}/junit/AggregateTransformer.java"
  -             unless="trax.present" />
       <exclude name="${optional.package}/sitraka/**" 
                unless="trax.present"/>
       <exclude name="${optional.package}/metamata/MMetrics*" 
  @@ -152,12 +147,6 @@
                unless="xalan.present" />
     </patternset>
     <patternset id="needs.xalan2">
  -    <exclude name="${optional.package}/junit/XMLResultAggregator.java"
  -             unless="xalan2.present" />
  -    <exclude name="${optional.package}/junit/AggregateTransformer.java"
  -             unless="xalan2.present" />
  -    <exclude name="${optional.package}/junit/XalanExecutor.java"
  -             unless="xalan2.present" />
       <exclude name="${optional.package}/junit/Xalan2Executor.java"
                unless="xalan2.present" />
     </patternset>
  @@ -185,6 +174,8 @@
                unless="bcel.present" />
       <exclude name="${util.package}/depend/bcel/*.java"
                unless="bcel.present" />
  +    <exclude name="${optional.type.package}/depend/ClassFileSetTest.java"
  +             unless="bcel.present" />
     </patternset>
     <patternset id="needs.jakarta.log4j">
       <exclude name="${ant.package}/listener/Log4jListener.java"
  @@ -272,9 +263,13 @@
       <available property="bsf.present"
                  classname="com.ibm.bsf.BSFManager"
                  classpathref="classpath" />
  -    <available property="netrexx.present"
  -               classname="netrexx.lang.Rexx"
  +    <condition property="netrexx.present">
  +      <and>
  +        <isset property="jdk1.2+"/>                
  +        <available classname="netrexx.lang.Rexx"
                  classpathref="classpath" />
  +      </and>
  +    </condition>
       <available property="trax.present"
                  classname="javax.xml.transform.Transformer"
                  classpathref="classpath" />
  @@ -323,9 +318,13 @@
       <available property="jmf.present"
                  classname="javax.sound.sampled.Clip"
                  classpathref="classpath"/>
  -    <available property="icontract.present"
  -               classname="com.reliablesystems.iContract.IContracted"
  +    <condition property="icontract.present">
  +        <and>
  +            <isset property="jdk1.2+"/>                
  +            <available classname="com.reliablesystems.iContract.IContracted"
                  classpathref="classpath"/>
  +        </and>
  +    </condition>
       <available property="jdepend.present"
                  classname="jdepend.framework.JDepend"
                  classpathref="classpath"/>
  @@ -350,9 +349,13 @@
       <available property="xerces.present"
                  classname="org.apache.xerces.parsers.SAXParser"
                  classpathref="classpath" />
  -    <available property="bcel.present"
  -               classname="org.apache.bcel.Constants"
  +    <condition property="bcel.present">
  +        <and>
  +            <isset property="jdk1.2+"/>                
  +            <available classname="org.apache.bcel.Constants"
                  classpathref="classpath" />
  +        </and>
  +    </condition>
       <available property="sunuue.present"
                  classname="sun.misc.UUEncoder"
                  classpathref="classpath" />
  @@ -408,6 +411,7 @@
              srcdir="${bin.dir}/ant1src_copy:${java.dir}/antlibs/ant1compat"
              debug="${debug}">
         <classpath refid="classpath"/>
  +
         <patternset refid="needs.jdk1.2+" />
         <patternset refid="needs.jdk1.4+" />
   
  
  
  
  1.7       +4 -4      jakarta-ant/proposal/mutant/src/java/antcore/org/apache/ant/antcore/antlib/AntLibManager.java
  
  Index: AntLibManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/mutant/src/java/antcore/org/apache/ant/antcore/antlib/AntLibManager.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -w -u -r1.6 -r1.7
  
  
  
  1.7       +7 -7      jakarta-ant/proposal/mutant/src/java/antcore/org/apache/ant/antcore/execution/BuildEventSupport.java
  
  Index: BuildEventSupport.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/mutant/src/java/antcore/org/apache/ant/antcore/execution/BuildEventSupport.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -w -u -r1.6 -r1.7
  
  
  
  1.11      +5 -5      jakarta-ant/proposal/mutant/src/java/antcore/org/apache/ant/antcore/execution/ComponentManager.java
  
  Index: ComponentManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/mutant/src/java/antcore/org/apache/ant/antcore/execution/ComponentManager.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -w -u -r1.10 -r1.11
  
  
  
  1.13      +2 -2      jakarta-ant/proposal/mutant/src/java/antcore/org/apache/ant/antcore/execution/ExecutionManager.java
  
  Index: ExecutionManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/mutant/src/java/antcore/org/apache/ant/antcore/execution/ExecutionManager.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -w -u -r1.12 -r1.13
  
  
  
  1.12      +9 -9      jakarta-ant/proposal/mutant/src/java/antcore/org/apache/ant/antcore/execution/Frame.java
  
  Index: Frame.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/mutant/src/java/antcore/org/apache/ant/antcore/execution/Frame.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -w -u -r1.11 -r1.12
  
  
  
  1.7       +1 -1      jakarta-ant/proposal/mutant/src/java/antcore/org/apache/ant/antcore/execution/Reflector.java
  
  Index: Reflector.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/mutant/src/java/antcore/org/apache/ant/antcore/execution/Reflector.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -w -u -r1.6 -r1.7
  
  
  
  1.4       +1 -1      jakarta-ant/proposal/mutant/src/java/antcore/org/apache/ant/antcore/modelparser/BuildElementHandler.java
  
  Index: BuildElementHandler.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/mutant/src/java/antcore/org/apache/ant/antcore/modelparser/BuildElementHandler.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -w -u -r1.3 -r1.4
  
  
  
  1.18      +2 -2      jakarta-ant/proposal/mutant/src/java/antlibs/ant1compat/org/apache/tools/ant/Project.java
  
  Index: Project.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/mutant/src/java/antlibs/ant1compat/org/apache/tools/ant/Project.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -w -u -r1.17 -r1.18
  
  
  
  1.6       +0 -32     jakarta-ant/proposal/mutant/src/java/antlibs/ant1compat/org/apache/tools/ant/ProjectComponent.java
  
  Index: ProjectComponent.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/mutant/src/java/antlibs/ant1compat/org/apache/tools/ant/ProjectComponent.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -w -u -r1.5 -r1.6
  --- ProjectComponent.java	18 Mar 2002 02:44:25 -0000	1.5
  +++ ProjectComponent.java	5 Apr 2002 14:31:16 -0000	1.6
  @@ -65,8 +65,6 @@
   public abstract class ProjectComponent {
       /** The project in which the project component operates */
       protected Project project;
  -    /** The location within the build file of this project component */
  -    protected Location location;
       /** The core context for this component */
       private AntContext context;
       /** The type of the component bneing created */
  @@ -83,15 +81,6 @@
       }
   
       /**
  -     * Sets the file location where this task was defined.
  -     *
  -     * @param location the new location value
  -     */
  -    public void setLocation(Location location) {
  -        this.location = location;
  -    }
  -
  -    /**
        * Gets the project of the ProjectComponent
        *
        * @return the project
  @@ -101,16 +90,6 @@
       }
   
       /**
  -     * Gets the location of the ProjectComponent's associated model element
  -     * in the build file
  -     *
  -     * @return the location of the associated model element
  -     */
  -    public Location getLocation() {
  -        return location;
  -    }
  -
  -    /**
        * Gets the componentType of the ProjectComponent
        *
        * @return the componentType value
  @@ -141,17 +120,6 @@
           this.context = context;
           this.componentType = componentType;
   
  -        org.apache.ant.common.util.Location contextLocation
  -             = context.getLocation();
  -
  -        if (contextLocation
  -             == org.apache.ant.common.util.Location.UNKNOWN_LOCATION) {
  -            location = Location.UNKNOWN_LOCATION;
  -        } else {
  -            location = new Location(contextLocation.getSource(),
  -                contextLocation.getLineNumber(),
  -                contextLocation.getColumnNumber());
  -        }
       }
   
       /**
  
  
  
  1.13      +34 -0     jakarta-ant/proposal/mutant/src/java/antlibs/ant1compat/org/apache/tools/ant/Task.java
  
  Index: Task.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/mutant/src/java/antlibs/ant1compat/org/apache/tools/ant/Task.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -w -u -r1.12 -r1.13
  --- Task.java	25 Mar 2002 13:27:18 -0000	1.12
  +++ Task.java	5 Apr 2002 14:31:16 -0000	1.13
  @@ -73,6 +73,8 @@
       protected String taskType = null;
       /** The description of this task */
       protected String description = null;
  +    /** The location within the build file of this project component */
  +    protected Location location;
   
       /**
        * Called by the project to let the task do its work. This method may be 
  @@ -142,6 +144,16 @@
           return description;
       }
   
  +    /**
  +     * Gets the location of the ProjectComponent's associated model element
  +     * in the build file
  +     *
  +     * @return the location of the associated model element
  +     */
  +    public Location getLocation() {
  +        return location;
  +    }
  +
   
       /**
        * Add a nested task to this Ant1 task.
  @@ -181,6 +193,18 @@
   
           taskType = componentType;
           taskName = componentType;
  +        
  +        org.apache.ant.common.util.Location contextLocation
  +             = context.getLocation();
  +
  +        if (contextLocation
  +             == org.apache.ant.common.util.Location.UNKNOWN_LOCATION) {
  +            location = Location.UNKNOWN_LOCATION;
  +        } else {
  +            location = new Location(contextLocation.getSource(),
  +                contextLocation.getLineNumber(),
  +                contextLocation.getColumnNumber());
  +        }
           init();
       }
   
  @@ -257,5 +281,15 @@
       void setTaskType(String type) {
           this.taskType = type;
       }
  +    
  +    /**
  +     * Sets the file location where this task was defined.
  +     *
  +     * @param location the new location value
  +     */
  +    public void setLocation(Location location) {
  +        this.location = location;
  +    }
  +
   }
   
  
  
  
  1.6       +1 -1      jakarta-ant/proposal/mutant/src/java/antlibs/ant1compat/org/apache/tools/ant/taskdefs/Ant.java
  
  Index: Ant.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/mutant/src/java/antlibs/ant1compat/org/apache/tools/ant/taskdefs/Ant.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -w -u -r1.5 -r1.6
  
  
  
  1.5       +1 -1      jakarta-ant/proposal/mutant/src/java/antlibs/ant1compat/org/apache/tools/ant/taskdefs/CallTarget.java
  
  Index: CallTarget.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/mutant/src/java/antlibs/ant1compat/org/apache/tools/ant/taskdefs/CallTarget.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -w -u -r1.4 -r1.5
  
  
  
  1.6       +1 -1      jakarta-ant/proposal/mutant/src/java/antlibs/script/org/apache/ant/antlib/script/ScriptBase.java
  
  Index: ScriptBase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/mutant/src/java/antlibs/script/org/apache/ant/antlib/script/ScriptBase.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -w -u -r1.5 -r1.6
  
  
  
  1.2       +1 -1      jakarta-ant/proposal/mutant/src/java/antlibs/system/org/apache/ant/antlib/system/Sequential.java
  
  Index: Sequential.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/mutant/src/java/antlibs/system/org/apache/ant/antlib/system/Sequential.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -w -u -r1.1 -r1.2
  
  
  
  1.3       +1 -1      jakarta-ant/proposal/mutant/src/java/bootstrap/org/apache/ant/builder/BuildHelper.java
  
  Index: BuildHelper.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/mutant/src/java/bootstrap/org/apache/ant/builder/BuildHelper.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -w -u -r1.2 -r1.3
  
  
  
  1.13      +2 -2      jakarta-ant/proposal/mutant/src/java/cli/org/apache/ant/cli/Commandline.java
  
  Index: Commandline.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/mutant/src/java/cli/org/apache/ant/cli/Commandline.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -w -u -r1.12 -r1.13
  
  
  
  1.4       +1 -1      jakarta-ant/proposal/mutant/src/java/common/org/apache/ant/common/model/ModelElement.java
  
  Index: ModelElement.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/mutant/src/java/common/org/apache/ant/common/model/ModelElement.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -w -u -r1.3 -r1.4
  
  
  
  1.7       +4 -4      jakarta-ant/proposal/mutant/src/java/common/org/apache/ant/common/model/Project.java
  
  Index: Project.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/mutant/src/java/common/org/apache/ant/common/model/Project.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -w -u -r1.6 -r1.7
  
  
  
  1.6       +1 -2      jakarta-ant/proposal/mutant/src/java/common/org/apache/ant/common/util/FileUtils.java
  
  Index: FileUtils.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/mutant/src/java/common/org/apache/ant/common/util/FileUtils.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -w -u -r1.5 -r1.6
  --- FileUtils.java	18 Mar 2002 02:44:27 -0000	1.5
  +++ FileUtils.java	5 Apr 2002 14:31:16 -0000	1.6
  @@ -186,8 +186,7 @@
   
               for (int i = 2; i < ca.length; i++) {
                   if ((ca[i] != '\\') ||
  -                    (ca[i] == '\\' && ca[i - 1] != '\\')
  -                    ) {
  +                    (ca[i] == '\\' && ca[i - 1] != '\\')) {
                       sb.append(ca[i]);
                   }
               }
  
  
  

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