Fixed checkstyle and findbugs warnings.
This commit is contained in:
parent
783adba4f1
commit
35f4fbeeb6
|
@ -87,7 +87,8 @@ public class FieldHermiteInterpolator<T extends FieldElement<T>> {
|
|||
* @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 {
|
||||
|
||||
|
|
|
@ -48,6 +48,7 @@ public class EnclosingBall<S extends Space, P extends Point<S>> 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;
|
||||
|
|
|
@ -171,7 +171,6 @@ public class PolyhedronsSet extends AbstractRegion<Euclidean3D, Euclidean2D> {
|
|||
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<Euclidean3D> boundary =
|
||||
new RegionFactory<Euclidean3D>().buildConvex(pxMin, pxMax, pyMin, pyMax, pzMin, pzMax);
|
||||
return boundary.getTree(false);
|
||||
|
|
|
@ -45,7 +45,8 @@ public class RegionFactory<S extends Space> {
|
|||
* @param hyperplanes collection of bounding hyperplanes
|
||||
* @return a new convex region, or null if the collection is empty
|
||||
*/
|
||||
public Region<S> buildConvex(final Hyperplane<S> ... hyperplanes) {
|
||||
@SafeVarargs
|
||||
public final Region<S> buildConvex(final Hyperplane<S> ... hyperplanes) {
|
||||
if ((hyperplanes == null) || (hyperplanes.length == 0)) {
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -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 {
|
|||
* </li>
|
||||
* </ul>
|
||||
*/
|
||||
@SafeVarargs
|
||||
public static double[][][] timesAndResults(int repeatChunk,
|
||||
int repeatStat,
|
||||
boolean runGC,
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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<Euclidean3D>().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<Euclidean3D>().buildConvex(
|
||||
new Plane(vertex3, vertex2, vertex1, 1.0e-10),
|
||||
|
|
Loading…
Reference in New Issue