ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mben...@apache.org
Subject cvs commit: ant/src/main/org/apache/tools/ant/taskdefs PathConvert.java
Date Tue, 22 Feb 2005 17:54:44 GMT
mbenson     2005/02/22 09:54:44

  Modified:    src/main/org/apache/tools/ant/taskdefs PathConvert.java
  Log:
  Trade 2 LOC for 10.
  
  Revision  Changes    Path
  1.38      +2 -10     ant/src/main/org/apache/tools/ant/taskdefs/PathConvert.java
  
  Index: PathConvert.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/PathConvert.java,v
  retrieving revision 1.37
  retrieving revision 1.38
  diff -u -r1.37 -r1.38
  --- PathConvert.java	22 Feb 2005 17:48:02 -0000	1.37
  +++ PathConvert.java	22 Feb 2005 17:54:44 -0000	1.38
  @@ -145,16 +145,8 @@
               // If the element starts with the configured prefix, then
               // convert the prefix to the configured 'to' value.
   
  -            if (cmpElem.startsWith(cmpFrom)) {
  -                int len = from.length();
  -
  -                if (len >= elem.length()) {
  -                    elem = to;
  -                } else {
  -                    elem = to + elem.substring(len);
  -                }
  -            }
  -            return elem;
  +            return cmpElem.startsWith(cmpFrom)
  +                ? to + elem.substring(from.length()) : elem;
           }
       }
   
  
  
  

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


Mime
View raw message