ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs Rmic.java
Date Mon, 09 Sep 2002 12:12:47 GMT
bodewig     2002/09/09 05:12:47

  Modified:    src/main/org/apache/tools/ant/taskdefs Rmic.java
  Log:
  Merge fix from 1.5 branch.
  
  PR: 5781 and 11630
  
  Revision  Changes    Path
  1.43      +6 -5      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Rmic.java
  
  Index: Rmic.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Rmic.java,v
  retrieving revision 1.42
  retrieving revision 1.43
  diff -u -r1.42 -r1.43
  --- Rmic.java	25 Jul 2002 15:21:05 -0000	1.42
  +++ Rmic.java	9 Sep 2002 12:12:47 -0000	1.43
  @@ -564,15 +564,16 @@
               adapter.getMapper().mapFileName(classFileName);
   
           for (int i = 0; i < generatedFiles.length; i++) {
  -            if (!generatedFiles[i].endsWith(".class")) {
  +            final String generatedFile = generatedFiles[i];
  +            if (!generatedFile.endsWith(".class")) {
                   // don't know how to handle that - a IDL file doesn't
                   // have a corresponding Java source for example.
                   continue;
               }
  -            
  -            String sourceFileName = 
  -                generatedFiles[i].substring(0, classFileName.length() - 6)
  -                + ".java";
  +
  +            final int pos = generatedFile.length() - ".class".length();
  +            String sourceFileName =
  +                generatedFile.substring(0, pos) + ".java";
   
               File oldFile = new File(baseDir, sourceFileName);
               if (!oldFile.exists()) {
  
  
  

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