ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject svn commit: r578832 - /ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Rmic.java
Date Mon, 24 Sep 2007 14:32:38 GMT
Author: jhm
Date: Mon Sep 24 07:32:37 2007
New Revision: 578832

URL: http://svn.apache.org/viewvc?rev=578832&view=rev
Log:
Use StringUtils.removeSuffix()

Modified:
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Rmic.java

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Rmic.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Rmic.java?rev=578832&r1=578831&r2=578832&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Rmic.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Rmic.java Mon Sep 24 07:32:37 2007
@@ -32,6 +32,7 @@
 import org.apache.tools.ant.util.FileNameMapper;
 import org.apache.tools.ant.util.FileUtils;
 import org.apache.tools.ant.util.SourceFileScanner;
+import org.apache.tools.ant.util.StringUtils;
 import org.apache.tools.ant.util.facade.FacadeTaskHelper;
 
 /**
@@ -576,8 +577,7 @@
                 // have a corresponding Java source for example.
                 continue;
             }
-            final int pos = generatedFile.length() - ".class".length();
-            String sourceFileName = generatedFile.substring(0, pos) + ".java";
+            String sourceFileName = StringUtils.removeSuffix(generatedFile, ".class"); 
 
             File oldFile = new File(baseDir, sourceFileName);
             if (!oldFile.exists()) {



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


Mime
View raw message