On 01/08/2015 11:22 AM, s...@apache.org wrote: > Repository: commons-math > Updated Branches: > refs/heads/master c278ac388 -> 6a82f9258 > > > Arrays.copyOf is Java 1.6+
this is a bug and worth a 3.4.1 release. Could you please create an issue for it. Thanks, Thomas > > Project: http://git-wip-us.apache.org/repos/asf/commons-math/repo > Commit: http://git-wip-us.apache.org/repos/asf/commons-math/commit/6a82f925 > Tree: http://git-wip-us.apache.org/repos/asf/commons-math/tree/6a82f925 > Diff: http://git-wip-us.apache.org/repos/asf/commons-math/diff/6a82f925 > > Branch: refs/heads/master > Commit: 6a82f92584b36e28798479c82c0d3263c6347b90 > Parents: c278ac3 > Author: Sebb <s...@apache.org> > Authored: Thu Jan 8 10:22:03 2015 +0000 > Committer: Sebb <s...@apache.org> > Committed: Thu Jan 8 10:22:03 2015 +0000 > > ---------------------------------------------------------------------- > .../java/org/apache/commons/math3/special/BesselJ.java | 11 +++++------ > 1 file changed, 5 insertions(+), 6 deletions(-) > ---------------------------------------------------------------------- > > > http://git-wip-us.apache.org/repos/asf/commons-math/blob/6a82f925/src/main/java/org/apache/commons/math3/special/BesselJ.java > ---------------------------------------------------------------------- > diff --git a/src/main/java/org/apache/commons/math3/special/BesselJ.java > b/src/main/java/org/apache/commons/math3/special/BesselJ.java > index f1e6999..a2897a5 100644 > --- a/src/main/java/org/apache/commons/math3/special/BesselJ.java > +++ b/src/main/java/org/apache/commons/math3/special/BesselJ.java > @@ -17,14 +17,13 @@ > > package org.apache.commons.math3.special; > > -import java.util.Arrays; > - > import org.apache.commons.math3.analysis.UnivariateFunction; > import org.apache.commons.math3.exception.ConvergenceException; > import org.apache.commons.math3.exception.MathIllegalArgumentException; > import org.apache.commons.math3.exception.util.LocalizedFormats; > import org.apache.commons.math3.special.Gamma; > import org.apache.commons.math3.util.FastMath; > +import org.apache.commons.math3.util.MathArrays; > > /** > * This class provides computation methods related to Bessel > @@ -206,7 +205,7 @@ public class BesselJ > * @param n count of valid values > */ > public BesselJResult(double[] b, int n) { > - vals = Arrays.copyOf(b, b.length); > + vals = MathArrays.copyOf(b, b.length); > nVals = n; > } > > @@ -214,7 +213,7 @@ public class BesselJ > * @return the computed function values > */ > public double[] getVals() { > - return Arrays.copyOf(vals, vals.length); > + return MathArrays.copyOf(vals, vals.length); > } > > /** > @@ -374,7 +373,7 @@ public class BesselJ > capq = (capq + 1) * ((gnu * gnu) - 1) * (0.125 / x); > b[i - 1] = xc * (capp * vcos - capq * vsin); > if (nb == 1) { > - return new BesselJResult(Arrays.copyOf(b, b.length), > + return new BesselJResult(MathArrays.copyOf(b, > b.length), > ncalc); > } > t = vsin; > @@ -645,6 +644,6 @@ public class BesselJ > } > ncalc = FastMath.min(nb, 0) - 1; > } > - return new BesselJResult(Arrays.copyOf(b, b.length), ncalc); > + return new BesselJResult(MathArrays.copyOf(b, b.length), ncalc); > } > } > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org