ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject cvs commit: ant/src/main/org/apache/tools/ant RuntimeConfigurable.java UnknownElement.java
Date Fri, 04 Jul 2003 08:52:44 GMT
bodewig     2003/07/04 01:52:44

  Modified:    src/main/org/apache/tools/ant RuntimeConfigurable.java
                        UnknownElement.java
  Log:
  Indentation changes
  
  Revision  Changes    Path
  1.37      +15 -15    ant/src/main/org/apache/tools/ant/RuntimeConfigurable.java
  
  Index: RuntimeConfigurable.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/RuntimeConfigurable.java,v
  retrieving revision 1.36
  retrieving revision 1.37
  diff -u -r1.36 -r1.37
  --- RuntimeConfigurable.java	4 Jul 2003 08:44:50 -0000	1.36
  +++ RuntimeConfigurable.java	4 Jul 2003 08:52:44 -0000	1.37
  @@ -367,23 +367,23 @@
               IntrospectionHelper.getHelper(p, target.getClass());
   
           if (attributeNames != null) {
  -        for (int i = 0; i < attributeNames.size(); i++) {
  -            String name = (String) attributeNames.get(i);
  -            String value = (String) attributeMap.get(name);
  -
  -            // reflect these into the target
  -            value = p.replaceProperties(value);
  -            try {
  -                ih.setAttribute(p, target,
  -                        name.toLowerCase(Locale.US), value);
  -            } catch (BuildException be) {
  -                // id attribute must be set externally
  -                if (!name.equals("id")) {
  -                    throw be;
  +            for (int i = 0; i < attributeNames.size(); i++) {
  +                String name = (String) attributeNames.get(i);
  +                String value = (String) attributeMap.get(name);
  +                
  +                // reflect these into the target
  +                value = p.replaceProperties(value);
  +                try {
  +                    ih.setAttribute(p, target,
  +                                    name.toLowerCase(Locale.US), value);
  +                } catch (BuildException be) {
  +                    // id attribute must be set externally
  +                    if (!name.equals("id")) {
  +                        throw be;
  +                    }
                   }
               }
  -        }
  -        id = (String) attributeMap.get("id");
  +            id = (String) attributeMap.get("id");
           }
   
           if (characters != null) {
  
  
  
  1.53      +20 -19    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.52
  retrieving revision 1.53
  diff -u -r1.52 -r1.53
  --- UnknownElement.java	4 Jul 2003 08:44:50 -0000	1.52
  +++ UnknownElement.java	4 Jul 2003 08:52:44 -0000	1.53
  @@ -313,27 +313,28 @@
           IntrospectionHelper ih = IntrospectionHelper.getHelper(parentClass);
   
           if (children != null) {
  -        Iterator it = children.iterator();
  -        for (int i = 0; it.hasNext(); i++) {
  -            RuntimeConfigurable childWrapper = parentWrapper.getChild(i);
  -            UnknownElement child = (UnknownElement) it.next();
  -            
  -            // backwards compatibility - element names of nested
  -            // elements have been all lower-case in Ant, except for
  -            // TaskContainers
  -            if (!handleChild(ih, parent, child, 
  -                             child.getTag().toLowerCase(Locale.US), 
  -                             childWrapper)) {
  -                if (!(parent instanceof TaskContainer)) {
  -                    ih.throwNotSupported(getProject(), parent, child.getTag());
  -                } else {
  -                    // a task container - anything could happen - just add the 
  -                    // child to the container
  -                    TaskContainer container = (TaskContainer) parent;
  -                    container.addTask(child);
  +            Iterator it = children.iterator();
  +            for (int i = 0; it.hasNext(); i++) {
  +                RuntimeConfigurable childWrapper = parentWrapper.getChild(i);
  +                UnknownElement child = (UnknownElement) it.next();
  +                
  +                // backwards compatibility - element names of nested
  +                // elements have been all lower-case in Ant, except for
  +                // TaskContainers
  +                if (!handleChild(ih, parent, child, 
  +                                 child.getTag().toLowerCase(Locale.US), 
  +                                 childWrapper)) {
  +                    if (!(parent instanceof TaskContainer)) {
  +                        ih.throwNotSupported(getProject(), parent, 
  +                                             child.getTag());
  +                    } else {
  +                        // a task container - anything could happen - just add the 
  +                        // child to the container
  +                        TaskContainer container = (TaskContainer) parent;
  +                        container.addTask(child);
  +                    }
                   }
               }
  -        }
           }
       }
   
  
  
  

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


Mime
View raw message