jkf         2005/06/27 10:59:36

  Modified:    src/main/org/apache/tools/ant/taskdefs/optional/junit
                        BatchTest.java
  Log:
  PR: 35499
  Classname may not contain / or \ so it is safe to convert both
  to . to get the class name. (Zipfilesets do not necessarily contain
  File.separator as separator characters.)
  
  Revision  Changes    Path
  1.21      +2 -1      
ant/src/main/org/apache/tools/ant/taskdefs/optional/junit/BatchTest.java
  
  Index: BatchTest.java
  ===================================================================
  RCS file: 
/home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/junit/BatchTest.java,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- BatchTest.java    9 Mar 2004 16:48:31 -0000       1.20
  +++ BatchTest.java    27 Jun 2005 17:59:36 -0000      1.21
  @@ -142,7 +142,8 @@
        * @return the classname matching the filename.
        */
       public static final String javaToClass(String filename) {
  -        return filename.replace(File.separatorChar, '.');
  +        return filename.replace(File.separatorChar, '.').replace('/', '.')
  +                .replace('\\', '.');
       }
   
       /**
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to