commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From l..@apache.org
Subject svn commit: r610792 - /commons/proper/math/trunk/src/test/org/apache/commons/math/stat/descriptive/ListUnivariateImplTest.java
Date Thu, 10 Jan 2008 13:50:47 GMT
Author: luc
Date: Thu Jan 10 05:50:46 2008
New Revision: 610792

URL: http://svn.apache.org/viewvc?rev=610792&view=rev
Log:
replaced calls to deprecated DescriptiveStatistics.newInstance() method

Modified:
    commons/proper/math/trunk/src/test/org/apache/commons/math/stat/descriptive/ListUnivariateImplTest.java

Modified: commons/proper/math/trunk/src/test/org/apache/commons/math/stat/descriptive/ListUnivariateImplTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/org/apache/commons/math/stat/descriptive/ListUnivariateImplTest.java?rev=610792&r1=610791&r2=610792&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/org/apache/commons/math/stat/descriptive/ListUnivariateImplTest.java
(original)
+++ commons/proper/math/trunk/src/test/org/apache/commons/math/stat/descriptive/ListUnivariateImplTest.java
Thu Jan 10 05:50:46 2008
@@ -100,7 +100,7 @@
     }
     
     public void testSkewAndKurtosis() {
-        DescriptiveStatistics u = DescriptiveStatistics.newInstance();
+        DescriptiveStatistics u = new DescriptiveStatistics();
         
         double[] testArray = { 12.5, 12, 11.8, 14.2, 14.9, 14.5, 21, 8.2, 10.3, 11.3, 14.1,
                                              9.9, 12.2, 12, 12.1, 11, 19.8, 11, 10, 8.8,
9, 12.3 };
@@ -140,15 +140,7 @@
     /** test stats */
     public void testSerialization() {
         
-        DescriptiveStatistics u = null;
-        
-        try {
-            u = DescriptiveStatistics.newInstance(ListUnivariateImpl.class);
-        } catch (InstantiationException e) {
-            fail(e.getMessage());
-        } catch (IllegalAccessException e) {
-            fail(e.getMessage());
-        }
+        DescriptiveStatistics u = new ListUnivariateImpl();
         
         assertEquals("total count",0,u.getN(),tolerance);
         u.addValue(one);



Mime
View raw message