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 1be42c870e9a776a5c7887b83e9add276770f154
Author: Gilles Sadowski <gil...@harfang.homelinux.org>
AuthorDate: Fri Sep 14 16:23:15 2018 +0200

    Unchecked exceptions removed from "throws" clause.
---
 .../main/java/org/apache/commons/geometry/core/Vector.java |  8 ++++----
 .../apache/commons/geometry/spherical/oned/ArcsSet.java    | 14 +++++---------
 2 files changed, 9 insertions(+), 13 deletions(-)

diff --git 
a/commons-geometry-core/src/main/java/org/apache/commons/geometry/core/Vector.java
 
b/commons-geometry-core/src/main/java/org/apache/commons/geometry/core/Vector.java
index b04d644..4804a80 100644
--- 
a/commons-geometry-core/src/main/java/org/apache/commons/geometry/core/Vector.java
+++ 
b/commons-geometry-core/src/main/java/org/apache/commons/geometry/core/Vector.java
@@ -124,7 +124,7 @@ public interface Vector<V extends Vector<V>> extends 
Spatial {
      * @return a new normalized vector
      * @exception IllegalNormException if the norm is zero, NaN, or infinite
      */
-    V normalize() throws IllegalNormException;
+    V normalize();
 
     /** Multiply the instance by a scalar.
      * @param a scalar
@@ -185,7 +185,7 @@ public interface Vector<V extends Vector<V>> extends 
Spatial {
      * @exception IllegalNormException if the norm of the base vector is zero, 
NaN, or infinite
      * @see #reject(Vector)
      */
-    V project(V base) throws IllegalNormException;
+    V project(V base);
 
     /** Get the rejection of the instance from the given base vector. The 
returned
      * vector is orthogonal to {@code base}. This operation can be interpreted 
as
@@ -200,12 +200,12 @@ public interface Vector<V extends Vector<V>> extends 
Spatial {
      * @exception IllegalNormException if the norm of the base vector is zero, 
NaN, or infinite
      * @see #project(Vector)
      */
-    V reject(V base) throws IllegalNormException;
+    V reject(V base);
 
     /** Compute the angular separation between two vectors in radians.
      * @param v other vector
      * @return angular separation between this instance and v in radians
      * @exception IllegalNormException if either vector has a zero, NaN, or 
infinite norm
      */
-    double angle(V v) throws IllegalNormException;
+    double angle(V v);
 }
diff --git 
a/commons-geometry-spherical/src/main/java/org/apache/commons/geometry/spherical/oned/ArcsSet.java
 
b/commons-geometry-spherical/src/main/java/org/apache/commons/geometry/spherical/oned/ArcsSet.java
index 8ca86ce..3334aea 100644
--- 
a/commons-geometry-spherical/src/main/java/org/apache/commons/geometry/spherical/oned/ArcsSet.java
+++ 
b/commons-geometry-spherical/src/main/java/org/apache/commons/geometry/spherical/oned/ArcsSet.java
@@ -63,8 +63,7 @@ public class ArcsSet extends AbstractRegion<S1Point, S1Point> 
implements Iterabl
      * @param tolerance tolerance below which close sub-arcs are merged 
together
      * @exception IllegalArgumentException if lower is greater than upper
      */
-    public ArcsSet(final double lower, final double upper, final double 
tolerance)
-        throws IllegalArgumentException {
+    public ArcsSet(final double lower, final double upper, final double 
tolerance) {
         super(buildTree(lower, upper, tolerance), tolerance);
     }
 
@@ -80,8 +79,7 @@ public class ArcsSet extends AbstractRegion<S1Point, S1Point> 
implements Iterabl
      * @exception IllegalArgumentException if the tree leaf nodes are not
      * consistent across the \( 0, 2 \pi \) crossing
      */
-    public ArcsSet(final BSPTree<S1Point> tree, final double tolerance)
-        throws IllegalArgumentException {
+    public ArcsSet(final BSPTree<S1Point> tree, final double tolerance) {
         super(tree, tolerance);
         check2PiConsistency();
     }
@@ -108,8 +106,7 @@ public class ArcsSet extends AbstractRegion<S1Point, 
S1Point> implements Iterabl
      * @exception IllegalArgumentException if the tree leaf nodes are not
      * consistent across the \( 0, 2 \pi \) crossing
      */
-    public ArcsSet(final Collection<SubHyperplane<S1Point>> boundary, final 
double tolerance)
-        throws IllegalArgumentException {
+    public ArcsSet(final Collection<SubHyperplane<S1Point>> boundary, final 
double tolerance) {
         super(boundary, tolerance);
         check2PiConsistency();
     }
@@ -122,8 +119,7 @@ public class ArcsSet extends AbstractRegion<S1Point, 
S1Point> implements Iterabl
      * @exception IllegalArgumentException if lower is greater than upper
      */
     private static BSPTree<S1Point> buildTree(final double lower, final double 
upper,
-                                               final double tolerance)
-        throws IllegalArgumentException {
+                                               final double tolerance) {
 
         if (Precision.equals(lower, upper, 0) || (upper - lower) >= 
Geometry.TWO_PI) {
             // the tree must cover the whole circle
@@ -168,7 +164,7 @@ public class ArcsSet extends AbstractRegion<S1Point, 
S1Point> implements Iterabl
     * @exception IllegalArgumentException if the tree leaf nodes are not
     * consistent across the \( 0, 2 \pi \) crossing
     */
-    private void check2PiConsistency() throws IllegalArgumentException {
+    private void check2PiConsistency() {
 
         // start search at the tree root
         BSPTree<S1Point> root = getTree(false);

Reply via email to