commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From celes...@apache.org
Subject svn commit: r1230435 - /commons/proper/math/trunk/src/test/java/org/apache/commons/math/distribution/TriangularDistributionTest.java
Date Thu, 12 Jan 2012 08:08:29 GMT
Author: celestin
Date: Thu Jan 12 08:08:29 2012
New Revision: 1230435

URL: http://svn.apache.org/viewvc?rev=1230435&view=rev
Log:
Removed invocations of some Java 1.6 methods (MATH-731).

Modified:
    commons/proper/math/trunk/src/test/java/org/apache/commons/math/distribution/TriangularDistributionTest.java

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/distribution/TriangularDistributionTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/distribution/TriangularDistributionTest.java?rev=1230435&r1=1230434&r2=1230435&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/distribution/TriangularDistributionTest.java
(original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/distribution/TriangularDistributionTest.java
Thu Jan 12 08:08:29 2012
@@ -100,7 +100,10 @@ public class TriangularDistributionTest 
         // probability of zero and one, meaning the inverse returns the
         // limits and not the points outside the limits.
         double[] points = makeCumulativeTestValues();
-        return Arrays.copyOfRange(points, 1, points.length - 1);
+        double[] points2 = new double[points.length-2];
+        System.arraycopy(points, 1, points2, 0, points2.length);
+        return points2;
+        //return Arrays.copyOfRange(points, 1, points.length - 1);
     }
 
     /**
@@ -113,7 +116,10 @@ public class TriangularDistributionTest 
         // probability of zero and one, meaning the inverse returns the
         // limits and not the points outside the limits.
         double[] points = makeCumulativeTestPoints();
-        return Arrays.copyOfRange(points, 1, points.length - 1);
+        double[] points2 = new double[points.length-2];
+        System.arraycopy(points, 1, points2, 0, points2.length);
+        return points2;
+        //return Arrays.copyOfRange(points, 1, points.length - 1);
     }
 
     /** Creates the default probability density test expected values. */



Mime
View raw message