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/taskdefs Ant.java
Date Sat, 26 Jan 2002 19:39:02 GMT
sbailliez    02/01/26 11:39:02

  Modified:    src/main/org/apache/tools/ant/taskdefs Ant.java
  Log:
  Fix violations
  
  Revision  Changes    Path
  1.38      +12 -13    jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Ant.java
  
  Index: Ant.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Ant.java,v
  retrieving revision 1.37
  retrieving revision 1.38
  diff -u -r1.37 -r1.38
  --- Ant.java	10 Jan 2002 13:59:31 -0000	1.37
  +++ Ant.java	26 Jan 2002 19:39:02 -0000	1.38
  @@ -1,7 +1,7 @@
   /*
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 2000-2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 2000-2002 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -146,7 +146,8 @@
   
       private void reinit() {
           init();
  -        for (int i=0; i<properties.size(); i++) {
  +        final int count = properties.size();
  +        for (int i = 0; i < count; i++) {
               Property p = (Property) properties.elementAt(i);
               Property newP = (Property) newProject.createTask("property");
               newP.setName(p.getName());
  @@ -165,7 +166,8 @@
   
       private void initializeProject() {
           Vector listeners = project.getBuildListeners();
  -        for (int i = 0; i < listeners.size(); i++) {
  +        final int count = properties.size();
  +        for (int i = 0; i < count; i++) {
               newProject.addBuildListener((BuildListener)listeners.elementAt(i));
           }
   
  @@ -205,10 +207,9 @@
   
           // set user-defined or all properties from calling project
           Hashtable prop1;
  -        if (inheritAll == true) {
  +        if (inheritAll) {
              prop1 = project.getProperties();
  -        }
  -        else {
  +        } else {
              prop1 = project.getUserProperties();
   
              // set Java built-in properties separately,
  @@ -225,7 +226,7 @@
               }
               
               String value = (String) prop1.get(arg);
  -            if (inheritAll == true){
  +            if (inheritAll){
                  newProject.setProperty(arg, value);
               } else {
                  newProject.setUserProperty(arg, value);
  @@ -236,8 +237,7 @@
       protected void handleOutput(String line) {
           if (newProject != null) {
               newProject.demuxOutput(line, false);
  -        }
  -        else {
  +        } else {
               super.handleOutput(line);
           }
       }
  @@ -245,8 +245,7 @@
       protected void handleErrorOutput(String line) {
           if (newProject != null) {
               newProject.demuxOutput(line, true);
  -        }
  -        else {
  +        } else {
               super.handleErrorOutput(line);
           }
       }
  @@ -260,7 +259,7 @@
                   reinit();
               }
           
  -            if ( (dir == null) && (inheritAll == true) ) {
  +            if ( (dir == null) && (inheritAll) ) {
                   dir = project.getBaseDir();
               }
   
  @@ -344,7 +343,7 @@
                       continue;
                   }
   
  -                Object o = thisReferences.remove(refid);
  +                thisReferences.remove(refid);
                   String toRefid = ref.getToRefid();
                   if (toRefid == null) {
                       toRefid = refid;
  
  
  

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