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 C309717F7D for ; Thu, 30 Apr 2015 16:36:05 +0000 (UTC) Received: (qmail 24423 invoked by uid 500); 30 Apr 2015 16:36:05 -0000 Delivered-To: apmail-commons-commits-archive@commons.apache.org Received: (qmail 24294 invoked by uid 500); 30 Apr 2015 16:36:05 -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 24187 invoked by uid 99); 30 Apr 2015 16:36:05 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Apr 2015 16:36:05 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 56D1FE00C5; Thu, 30 Apr 2015 16:36:05 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: luc@apache.org To: commits@commons.apache.org Date: Thu, 30 Apr 2015 16:36:08 -0000 Message-Id: In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [5/5] [math] Fixed checkstyle and findbugs warnings. Fixed checkstyle and findbugs warnings. Project: http://git-wip-us.apache.org/repos/asf/commons-math/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-math/commit/35f4fbee Tree: http://git-wip-us.apache.org/repos/asf/commons-math/tree/35f4fbee Diff: http://git-wip-us.apache.org/repos/asf/commons-math/diff/35f4fbee Branch: refs/heads/master Commit: 35f4fbeeb6feff2fd364f79d845449417d84cc74 Parents: 783adba Author: Luc Maisonobe Authored: Thu Apr 30 18:35:35 2015 +0200 Committer: Luc Maisonobe Committed: Thu Apr 30 18:35:35 2015 +0200 ---------------------------------------------------------------------- .../math4/analysis/interpolation/FieldHermiteInterpolator.java | 3 ++- .../apache/commons/math4/geometry/enclosing/EnclosingBall.java | 1 + .../commons/math4/geometry/euclidean/threed/PolyhedronsSet.java | 1 - .../apache/commons/math4/geometry/partitioning/RegionFactory.java | 3 ++- src/test/java/org/apache/commons/math4/PerfTestUtils.java | 2 ++ .../math4/analysis/interpolation/TricubicInterpolatorTest.java | 1 - .../math4/geometry/euclidean/threed/PolyhedronsSetTest.java | 2 -- 7 files changed, 7 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/commons-math/blob/35f4fbee/src/main/java/org/apache/commons/math4/analysis/interpolation/FieldHermiteInterpolator.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/math4/analysis/interpolation/FieldHermiteInterpolator.java b/src/main/java/org/apache/commons/math4/analysis/interpolation/FieldHermiteInterpolator.java index 8945aae..e5e660f 100644 --- a/src/main/java/org/apache/commons/math4/analysis/interpolation/FieldHermiteInterpolator.java +++ b/src/main/java/org/apache/commons/math4/analysis/interpolation/FieldHermiteInterpolator.java @@ -87,7 +87,8 @@ public class FieldHermiteInterpolator> { * @throws DimensionMismatchException if derivative structures are inconsistent * @throws NullArgumentException if x is null */ - public void addSamplePoint(final T x, final T[] ... value) + @SafeVarargs + public final void addSamplePoint(final T x, final T[] ... value) throws ZeroException, MathArithmeticException, DimensionMismatchException, NullArgumentException { http://git-wip-us.apache.org/repos/asf/commons-math/blob/35f4fbee/src/main/java/org/apache/commons/math4/geometry/enclosing/EnclosingBall.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/math4/geometry/enclosing/EnclosingBall.java b/src/main/java/org/apache/commons/math4/geometry/enclosing/EnclosingBall.java index 64caf28..9279377 100644 --- a/src/main/java/org/apache/commons/math4/geometry/enclosing/EnclosingBall.java +++ b/src/main/java/org/apache/commons/math4/geometry/enclosing/EnclosingBall.java @@ -48,6 +48,7 @@ public class EnclosingBall> implements Seria * @param radius radius of the ball * @param support support points used to define the ball */ + @SafeVarargs public EnclosingBall(final P center, final double radius, final P ... support) { this.center = center; this.radius = radius; http://git-wip-us.apache.org/repos/asf/commons-math/blob/35f4fbee/src/main/java/org/apache/commons/math4/geometry/euclidean/threed/PolyhedronsSet.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/math4/geometry/euclidean/threed/PolyhedronsSet.java b/src/main/java/org/apache/commons/math4/geometry/euclidean/threed/PolyhedronsSet.java index 744aa9f..9de30ce 100644 --- a/src/main/java/org/apache/commons/math4/geometry/euclidean/threed/PolyhedronsSet.java +++ b/src/main/java/org/apache/commons/math4/geometry/euclidean/threed/PolyhedronsSet.java @@ -171,7 +171,6 @@ public class PolyhedronsSet extends AbstractRegion { final Plane pyMax = new Plane(new Vector3D(0, yMax, 0), Vector3D.PLUS_J, tolerance); final Plane pzMin = new Plane(new Vector3D(0, 0, zMin), Vector3D.MINUS_K, tolerance); final Plane pzMax = new Plane(new Vector3D(0, 0, zMax), Vector3D.PLUS_K, tolerance); - @SuppressWarnings("unchecked") final Region boundary = new RegionFactory().buildConvex(pxMin, pxMax, pyMin, pyMax, pzMin, pzMax); return boundary.getTree(false); http://git-wip-us.apache.org/repos/asf/commons-math/blob/35f4fbee/src/main/java/org/apache/commons/math4/geometry/partitioning/RegionFactory.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/math4/geometry/partitioning/RegionFactory.java b/src/main/java/org/apache/commons/math4/geometry/partitioning/RegionFactory.java index cf96192..9e32c99 100644 --- a/src/main/java/org/apache/commons/math4/geometry/partitioning/RegionFactory.java +++ b/src/main/java/org/apache/commons/math4/geometry/partitioning/RegionFactory.java @@ -45,7 +45,8 @@ public class RegionFactory { * @param hyperplanes collection of bounding hyperplanes * @return a new convex region, or null if the collection is empty */ - public Region buildConvex(final Hyperplane ... hyperplanes) { + @SafeVarargs + public final Region buildConvex(final Hyperplane ... hyperplanes) { if ((hyperplanes == null) || (hyperplanes.length == 0)) { return null; } http://git-wip-us.apache.org/repos/asf/commons-math/blob/35f4fbee/src/test/java/org/apache/commons/math4/PerfTestUtils.java ---------------------------------------------------------------------- diff --git a/src/test/java/org/apache/commons/math4/PerfTestUtils.java b/src/test/java/org/apache/commons/math4/PerfTestUtils.java index 75afa60..f137a47 100644 --- a/src/test/java/org/apache/commons/math4/PerfTestUtils.java +++ b/src/test/java/org/apache/commons/math4/PerfTestUtils.java @@ -51,6 +51,7 @@ public class PerfTestUtils { * taken by a single call to the {@code call} method (i.e. the time * taken by each timed block divided by {@code repeatChunk}). */ + @SafeVarargs public static StatisticalSummary[] time(int repeatChunk, int repeatStat, boolean runGC, @@ -95,6 +96,7 @@ public class PerfTestUtils { * * */ + @SafeVarargs public static double[][][] timesAndResults(int repeatChunk, int repeatStat, boolean runGC, http://git-wip-us.apache.org/repos/asf/commons-math/blob/35f4fbee/src/test/java/org/apache/commons/math4/analysis/interpolation/TricubicInterpolatorTest.java ---------------------------------------------------------------------- diff --git a/src/test/java/org/apache/commons/math4/analysis/interpolation/TricubicInterpolatorTest.java b/src/test/java/org/apache/commons/math4/analysis/interpolation/TricubicInterpolatorTest.java index a02e7d5..8c9c579 100644 --- a/src/test/java/org/apache/commons/math4/analysis/interpolation/TricubicInterpolatorTest.java +++ b/src/test/java/org/apache/commons/math4/analysis/interpolation/TricubicInterpolatorTest.java @@ -90,7 +90,6 @@ public final class TricubicInterpolatorTest { double[] zval = new double[] {-12, -8, -5.5, -3, 0, 2.5}; double[][][] fval = new double[xval.length][yval.length][zval.length]; - @SuppressWarnings("unused") TricubicInterpolatingFunction tcf = new TricubicInterpolator().interpolate(xval, yval, zval, fval); // Valid. http://git-wip-us.apache.org/repos/asf/commons-math/blob/35f4fbee/src/test/java/org/apache/commons/math4/geometry/euclidean/threed/PolyhedronsSetTest.java ---------------------------------------------------------------------- diff --git a/src/test/java/org/apache/commons/math4/geometry/euclidean/threed/PolyhedronsSetTest.java b/src/test/java/org/apache/commons/math4/geometry/euclidean/threed/PolyhedronsSetTest.java index 5c6f93c..8d4b003 100644 --- a/src/test/java/org/apache/commons/math4/geometry/euclidean/threed/PolyhedronsSetTest.java +++ b/src/test/java/org/apache/commons/math4/geometry/euclidean/threed/PolyhedronsSetTest.java @@ -103,7 +103,6 @@ public class PolyhedronsSetTest { Vector3D vertex2 = new Vector3D(2, 2, 4); Vector3D vertex3 = new Vector3D(2, 3, 3); Vector3D vertex4 = new Vector3D(1, 3, 4); - @SuppressWarnings("unchecked") PolyhedronsSet tree = (PolyhedronsSet) new RegionFactory().buildConvex( new Plane(vertex3, vertex2, vertex1, 1.0e-10), @@ -138,7 +137,6 @@ public class PolyhedronsSetTest { Vector3D vertex2 = new Vector3D(2.0, 2.4, 4.2); Vector3D vertex3 = new Vector3D(2.8, 3.3, 3.7); Vector3D vertex4 = new Vector3D(1.0, 3.6, 4.5); - @SuppressWarnings("unchecked") PolyhedronsSet tree = (PolyhedronsSet) new RegionFactory().buildConvex( new Plane(vertex3, vertex2, vertex1, 1.0e-10),