Return-Path: Delivered-To: apmail-ant-dev-archive@www.apache.org Received: (qmail 8470 invoked from network); 22 Feb 2005 17:54:48 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 22 Feb 2005 17:54:48 -0000 Received: (qmail 14792 invoked by uid 500); 22 Feb 2005 17:54:46 -0000 Delivered-To: apmail-ant-dev-archive@ant.apache.org Received: (qmail 14751 invoked by uid 500); 22 Feb 2005 17:54:46 -0000 Mailing-List: contact dev-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Developers List" Reply-To: "Ant Developers List" Delivered-To: mailing list dev@ant.apache.org Received: (qmail 14737 invoked by uid 500); 22 Feb 2005 17:54:46 -0000 Received: (qmail 14734 invoked by uid 99); 22 Feb 2005 17:54:46 -0000 X-ASF-Spam-Status: No, hits=-9.8 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from minotaur.apache.org (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.28) with SMTP; Tue, 22 Feb 2005 09:54:46 -0800 Received: (qmail 8427 invoked by uid 1818); 22 Feb 2005 17:54:44 -0000 Date: 22 Feb 2005 17:54:44 -0000 Message-ID: <20050222175444.8426.qmail@minotaur.apache.org> From: mbenson@apache.org To: ant-cvs@apache.org Subject: cvs commit: ant/src/main/org/apache/tools/ant/taskdefs PathConvert.java X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N 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