You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by bi...@apache.org on 2004/01/11 21:50:11 UTC

cvs commit: jakarta-commons/math/src/test/org/apache/commons/math/random EmpiricalDistributionTest.java

billbarker    2004/01/11 12:50:11

  Modified:    math/src/test/org/apache/commons/math/random
                        EmpiricalDistributionTest.java
  Log:
  Fix URL -> File conversion in the test.
  
  I'd forgotten that I had added this to my code when looking at BZ #25972.
  
  Revision  Changes    Path
  1.9       +4 -2      jakarta-commons/math/src/test/org/apache/commons/math/random/EmpiricalDistributionTest.java
  
  Index: EmpiricalDistributionTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/math/src/test/org/apache/commons/math/random/EmpiricalDistributionTest.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- EmpiricalDistributionTest.java	11 Jan 2004 07:26:51 -0000	1.8
  +++ EmpiricalDistributionTest.java	11 Jan 2004 20:50:11 -0000	1.9
  @@ -58,6 +58,7 @@
   import junit.framework.TestSuite;
   import java.io.File;
   import java.net.URL;
  +import java.net.URLDecoder;
   
   import org.apache.commons.math.stat.DescriptiveStatistics;
   import org.apache.commons.math.stat.StorelessDescriptiveStatisticsImpl;
  @@ -81,7 +82,8 @@
       public void setUp() {
           empiricalDistribution = new EmpiricalDistributionImpl(100);
           url = getClass().getResource("testData.txt");
  -        file = new File(url.getFile());
  +        String fileName = URLDecoder.decode(url.getFile());
  +        file = new File(fileName);
       }
   
       public static Test suite() {
  
  
  

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