This is an automated email from the ASF dual-hosted git repository.

erans pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-geometry.git

commit 219b00f96c2c55b506a1f8f8bfc687c592b75b90
Author: Gilles Sadowski <[email protected]>
AuthorDate: Thu Nov 28 15:07:16 2019 +0100

    Spurious "throws" clauses.
    
    Reported by "sonarcloud.io".
---
 .../java/org/apache/commons/geometry/euclidean/internal/Vectors.java  | 2 +-
 .../geometry/euclidean/twod/hull/AbstractConvexHullGenerator2D.java   | 3 +--
 .../org/apache/commons/geometry/euclidean/twod/hull/ConvexHull2D.java | 4 +---
 .../commons/geometry/euclidean/twod/hull/ConvexHullGenerator2D.java   | 3 +--
 .../java/org/apache/commons/geometry/hull/ConvexHullGenerator.java    | 3 +--
 5 files changed, 5 insertions(+), 10 deletions(-)

diff --git 
a/commons-geometry-euclidean/src/main/java/org/apache/commons/geometry/euclidean/internal/Vectors.java
 
b/commons-geometry-euclidean/src/main/java/org/apache/commons/geometry/euclidean/internal/Vectors.java
index fa5cc8f..755eaeb 100644
--- 
a/commons-geometry-euclidean/src/main/java/org/apache/commons/geometry/euclidean/internal/Vectors.java
+++ 
b/commons-geometry-euclidean/src/main/java/org/apache/commons/geometry/euclidean/internal/Vectors.java
@@ -44,7 +44,7 @@ public final class Vectors {
      * @throws IllegalNormException if the given norm value is NaN, infinite,
      *  or zero
      */
-    public static double checkedNorm(final double norm) throws 
IllegalNormException {
+    public static double checkedNorm(final double norm) {
         if (!isRealNonZero(norm)) {
             throw new IllegalNormException(norm);
         }
diff --git 
a/commons-geometry-hull/src/main/java/org/apache/commons/geometry/euclidean/twod/hull/AbstractConvexHullGenerator2D.java
 
b/commons-geometry-hull/src/main/java/org/apache/commons/geometry/euclidean/twod/hull/AbstractConvexHullGenerator2D.java
index 1f5d3f2..3e2330f 100644
--- 
a/commons-geometry-hull/src/main/java/org/apache/commons/geometry/euclidean/twod/hull/AbstractConvexHullGenerator2D.java
+++ 
b/commons-geometry-hull/src/main/java/org/apache/commons/geometry/euclidean/twod/hull/AbstractConvexHullGenerator2D.java
@@ -82,8 +82,7 @@ abstract class AbstractConvexHullGenerator2D implements 
ConvexHullGenerator2D {
 
     /** {@inheritDoc} */
     @Override
-    public ConvexHull2D generate(final Collection<Vector2D> points)
-            throws IllegalStateException {
+    public ConvexHull2D generate(final Collection<Vector2D> points) {
         Collection<Vector2D> hullVertices = null;
         if (points.size() < 2) {
             hullVertices = points;
diff --git 
a/commons-geometry-hull/src/main/java/org/apache/commons/geometry/euclidean/twod/hull/ConvexHull2D.java
 
b/commons-geometry-hull/src/main/java/org/apache/commons/geometry/euclidean/twod/hull/ConvexHull2D.java
index 663729f..da716a3 100644
--- 
a/commons-geometry-hull/src/main/java/org/apache/commons/geometry/euclidean/twod/hull/ConvexHull2D.java
+++ 
b/commons-geometry-hull/src/main/java/org/apache/commons/geometry/euclidean/twod/hull/ConvexHull2D.java
@@ -50,9 +50,7 @@ public class ConvexHull2D implements ConvexHull<Vector2D> {
      * @param precision precision context used to compare floating point 
numbers
      * @throws IllegalArgumentException if the vertices do not form a convex 
hull
      */
-    public ConvexHull2D(final Vector2D[] vertices, final 
DoublePrecisionContext precision)
-        throws IllegalArgumentException {
-
+    public ConvexHull2D(final Vector2D[] vertices, final 
DoublePrecisionContext precision) {
         this.precision = precision;
 
         if (!isConvex(vertices)) {
diff --git 
a/commons-geometry-hull/src/main/java/org/apache/commons/geometry/euclidean/twod/hull/ConvexHullGenerator2D.java
 
b/commons-geometry-hull/src/main/java/org/apache/commons/geometry/euclidean/twod/hull/ConvexHullGenerator2D.java
index 8f46189..ebe71fd 100644
--- 
a/commons-geometry-hull/src/main/java/org/apache/commons/geometry/euclidean/twod/hull/ConvexHullGenerator2D.java
+++ 
b/commons-geometry-hull/src/main/java/org/apache/commons/geometry/euclidean/twod/hull/ConvexHullGenerator2D.java
@@ -28,6 +28,5 @@ public interface ConvexHullGenerator2D extends 
ConvexHullGenerator<Vector2D> {
 
     /** {@inheritDoc} */
     @Override
-    ConvexHull2D generate(Collection<Vector2D> points) throws 
IllegalStateException;
-
+    ConvexHull2D generate(Collection<Vector2D> points);
 }
diff --git 
a/commons-geometry-hull/src/main/java/org/apache/commons/geometry/hull/ConvexHullGenerator.java
 
b/commons-geometry-hull/src/main/java/org/apache/commons/geometry/hull/ConvexHullGenerator.java
index f3c013a..fdf40a7 100644
--- 
a/commons-geometry-hull/src/main/java/org/apache/commons/geometry/hull/ConvexHullGenerator.java
+++ 
b/commons-geometry-hull/src/main/java/org/apache/commons/geometry/hull/ConvexHullGenerator.java
@@ -29,7 +29,6 @@ import org.apache.commons.geometry.core.Point;
  * @see <a href="http://mathworld.wolfram.com/ConvexHull.html";>Convex Hull 
(MathWorld)</a>
  */
 public interface ConvexHullGenerator<P extends Point<P>> {
-
     /**
      * Builds the convex hull from the set of input points.
      *
@@ -38,5 +37,5 @@ public interface ConvexHullGenerator<P extends Point<P>> {
      * @throws IllegalStateException if generator fails to generate a convex 
hull for
      * the given set of input points
      */
-    ConvexHull<P> generate(Collection<P> points) throws IllegalStateException;
+    ConvexHull<P> generate(Collection<P> points);
 }

Reply via email to