Return-Path: X-Original-To: apmail-commons-commits-archive@minotaur.apache.org Delivered-To: apmail-commons-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E73D6177D6 for ; Thu, 8 Jan 2015 10:22:17 +0000 (UTC) Received: (qmail 12615 invoked by uid 500); 8 Jan 2015 10:22:18 -0000 Delivered-To: apmail-commons-commits-archive@commons.apache.org Received: (qmail 12544 invoked by uid 500); 8 Jan 2015 10:22:18 -0000 Mailing-List: contact commits-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@commons.apache.org Delivered-To: mailing list commits@commons.apache.org Received: (qmail 12534 invoked by uid 99); 8 Jan 2015 10:22:18 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Jan 2015 10:22:18 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 8144631924B; Thu, 8 Jan 2015 10:22:18 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: sebb@apache.org To: commits@commons.apache.org Message-Id: <5d4842e488824bd9a0805097497472f5@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [math] Arrays.copyOf is Java 1.6+ Date: Thu, 8 Jan 2015 10:22:18 +0000 (UTC) Repository: commons-math Updated Branches: refs/heads/master c278ac388 -> 6a82f9258 Arrays.copyOf is Java 1.6+ 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 Authored: Thu Jan 8 10:22:03 2015 +0000 Committer: Sebb 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); } }