ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From co...@apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ejb GenericDeploymentTool.java
Date Thu, 02 Aug 2001 12:53:51 GMT
conor       01/08/02 05:53:51

  Modified:    src/main/org/apache/tools/ant/taskdefs/optional/ejb
                        GenericDeploymentTool.java
  Log:
  Handle innser classes in the default package
  
  PR:	2934
  
  Revision  Changes    Path
  1.21      +8 -3      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ejb/GenericDeploymentTool.java
  
  Index: GenericDeploymentTool.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ejb/GenericDeploymentTool.java,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- GenericDeploymentTool.java	2001/06/26 11:05:17	1.20
  +++ GenericDeploymentTool.java	2001/08/02 12:53:51	1.21
  @@ -693,11 +693,16 @@
                   InnerClassFilenameFilter flt = new InnerClassFilenameFilter(entryFile.getName());
                   File entryDir = entryFile.getParentFile();
                   String[] innerfiles = entryDir.list(flt);
  -                for (int i=0, n=innerfiles.length; i < n; i++) {
  +                for (int i = 0, n = innerfiles.length; i < n; i++) {
               
                       //get and clean up innerclass name
  -                    entryName = entryName.substring(0, entryName.lastIndexOf(entryFile.getName())-1)
+ File.separatorChar + innerfiles[i];
  -        
  +                    int entryIndex = entryName.lastIndexOf(entryFile.getName()) -1;
  +                    if ( entryIndex < 0) {
  +                        entryName = innerfiles[i];
  +                    }
  +                    else {
  +                        entryName = entryName.substring(0, entryIndex) + File.separatorChar
+ innerfiles[i];
  +                    }
                       // link the file
                       entryFile = new File(config.srcDir, entryName);
           
  
  
  

Mime
View raw message