Am Thu, 8 Jan 2015 15:44:34 +0000 schrieb sebb <seb...@gmail.com>: > On 8 January 2015 at 11:45, Thomas Neidhart > <thomas.neidh...@gmail.com> wrote: > > On 01/08/2015 12:25 PM, sebb wrote: > >> On 8 January 2015 at 11:13, Thomas Neidhart > >> <thomas.neidh...@gmail.com> wrote: > >>> 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. > >> > >> I assumed it was a recent commit - did no-one test using Java 1.5 > >> for the last release? > > > > yes, but we also released math 3.4 just recently, and it was the > > last added feature. > > Well, going forward I think either the RM or a reviewer should > build/test with the target Java version, or someone should at least > check the CI builds. > > > We certainly need to add animal-sniffer to our release building > > process to detect such things. > > Does that actually detect such things? > > It's more reliable to actually use the proper compiler ...
BTW: I noticed that we write the X-JDK-Source/Target into the JAR file and it will also write the Java version of the maven run. It will however not document the compiler Java version (which can be different due to -Pjava-1.6. I actually would run maven for [VFS] with java7 (to get the new findbugs 3.x dependency which is done by commons-parent automatically) but also use -Pjava1.6 to enforce using a clean bootclasspath for the compiler. Gruss Bernd > > Thomas > > > >> > >>> Could you please create an issue for it. > >> > >> OK, but don't have time just now. > >> > >>> 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