Hello. On Thu, Jan 12, 2012 at 08:08:29AM -0000, celes...@apache.org wrote: > 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); > }
You might want to create a "copyOfRange" method in class "o.a.c.m.util.MathArrays". [This will remind that some code could be upgraded when the target version allows it.] Regards, Gilles > /** > @@ -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. */ > > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org