ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject cvs commit: ant/src/testcases/org/apache/tools/ant/taskdefs/optional/sitraka XMLReportTest.java
Date Fri, 05 Nov 2004 15:13:32 GMT
bodewig     2004/11/05 07:13:32

  Modified:    src/main/org/apache/tools/ant/types XMLCatalog.java
               src/testcases/org/apache/tools/ant/taskdefs/optional/sitraka
                        XMLReportTest.java
  Log:
  Some places where url.toFile has been used instead of FileUtils.fromURI.
  
  PR: 30593, 30642
  Submitted by:	Kevin Greiner <kgreiner at xpediantsolutions dot com>
  
  Revision  Changes    Path
  1.41      +1 -1      ant/src/main/org/apache/tools/ant/types/XMLCatalog.java
  
  Index: XMLCatalog.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/types/XMLCatalog.java,v
  retrieving revision 1.40
  retrieving revision 1.41
  diff -u -r1.40 -r1.41
  --- XMLCatalog.java	9 Mar 2004 16:48:41 -0000	1.40
  +++ XMLCatalog.java	5 Nov 2004 15:13:32 -0000	1.41
  @@ -679,7 +679,7 @@
           }
   
           if (url != null) {
  -            String fileName = url.getFile();
  +            String fileName = fileUtils.fromURI(url.toString());
               if (fileName != null) {
                   log("fileName " + fileName, Project.MSG_DEBUG);
                   File resFile = new File(fileName);
  
  
  
  1.8       +5 -1      ant/src/testcases/org/apache/tools/ant/taskdefs/optional/sitraka/XMLReportTest.java
  
  Index: XMLReportTest.java
  ===================================================================
  RCS file: /home/cvs/ant/src/testcases/org/apache/tools/ant/taskdefs/optional/sitraka/XMLReportTest.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- XMLReportTest.java	9 Mar 2004 16:49:03 -0000	1.7
  +++ XMLReportTest.java	5 Nov 2004 15:13:32 -0000	1.8
  @@ -28,6 +28,7 @@
   
   import junit.framework.TestCase;
   import org.apache.tools.ant.types.Path;
  +import org.apache.tools.ant.util.FileUtils;
   import org.w3c.dom.Document;
   import org.w3c.dom.Node;
   import org.w3c.dom.NodeList;
  @@ -36,6 +37,9 @@
    * Ensure that reference classpath feature is working fine...
    */
   public class XMLReportTest extends TestCase {
  +    /** helper for some File/URL connversions */
  +    private static FileUtils fileUtils = FileUtils.newFileUtils();
  +
       public XMLReportTest(String s) {
           super(s);
       }
  @@ -45,7 +49,7 @@
           if (url == null) {
               throw new FileNotFoundException("Unable to load '" + name + "' from classpath");
           }
  -        return new File(url.getFile());
  +        return new File(fileUtils.fromURI(url.toString()));
       }
   
       public void testCreateDocument() throws Exception {
  
  
  

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


Mime
View raw message