ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject cvs commit: ant/src/main/org/apache/tools/ant/taskdefs/optional/junit BatchTest.java
Date Mon, 27 Jun 2005 17:59:36 GMT
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: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message