You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ma...@apache.org on 2020/07/07 02:03:03 UTC
[commons-geometry] branch master updated: Reverting name change
after discussion on dev ML.
This is an automated email from the ASF dual-hosted git repository.
mattjuntunen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-geometry.git
The following commit(s) were added to refs/heads/master by this push:
new 8df6909 Reverting name change after discussion on dev ML.
8df6909 is described below
commit 8df6909e97c45e529eab9f547cc1cbdb10342066
Author: Matt Juntunen <ma...@apache.org>
AuthorDate: Mon Jul 6 21:49:25 2020 -0400
Reverting name change after discussion on dev ML.
This reverts commit 3c25e07d19e0d7c36073713c6a60d15adf4a5ecf.
---
.../{GeometryInternalException.java => GeometryInternalError.java} | 4 ++--
...metryInternalExceptionTest.java => GeometryInternalErrorTest.java} | 4 ++--
.../java/org/apache/commons/geometry/enclosing/WelzlEncloser.java | 4 ++--
.../geometry/euclidean/threed/rotation/QuaternionRotation.java | 4 ++--
4 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/commons-geometry-core/src/main/java/org/apache/commons/geometry/core/internal/GeometryInternalException.java b/commons-geometry-core/src/main/java/org/apache/commons/geometry/core/internal/GeometryInternalError.java
similarity index 93%
rename from commons-geometry-core/src/main/java/org/apache/commons/geometry/core/internal/GeometryInternalException.java
rename to commons-geometry-core/src/main/java/org/apache/commons/geometry/core/internal/GeometryInternalError.java
index caf209e..bc52f62 100644
--- a/commons-geometry-core/src/main/java/org/apache/commons/geometry/core/internal/GeometryInternalException.java
+++ b/commons-geometry-core/src/main/java/org/apache/commons/geometry/core/internal/GeometryInternalError.java
@@ -20,7 +20,7 @@ package org.apache.commons.geometry.core.internal;
* This class is not intended to be part of the public API and should
* never be seen by the user when algorithms are functioning correctly.
*/
-public class GeometryInternalException extends IllegalStateException {
+public class GeometryInternalError extends IllegalStateException {
/** Error message used for exceptions of this type. */
private static final String ERROR_MSG = "An internal geometry error occurred. This most often indicates an " +
@@ -32,7 +32,7 @@ public class GeometryInternalException extends IllegalStateException {
/** Simple constructor with a default error message.
*/
- public GeometryInternalException() {
+ public GeometryInternalError() {
super(ERROR_MSG);
}
}
diff --git a/commons-geometry-core/src/test/java/org/apache/commons/geometry/core/internal/GeometryInternalExceptionTest.java b/commons-geometry-core/src/test/java/org/apache/commons/geometry/core/internal/GeometryInternalErrorTest.java
similarity index 91%
rename from commons-geometry-core/src/test/java/org/apache/commons/geometry/core/internal/GeometryInternalExceptionTest.java
rename to commons-geometry-core/src/test/java/org/apache/commons/geometry/core/internal/GeometryInternalErrorTest.java
index 4780365..87198e1 100644
--- a/commons-geometry-core/src/test/java/org/apache/commons/geometry/core/internal/GeometryInternalExceptionTest.java
+++ b/commons-geometry-core/src/test/java/org/apache/commons/geometry/core/internal/GeometryInternalErrorTest.java
@@ -19,12 +19,12 @@ package org.apache.commons.geometry.core.internal;
import org.junit.Assert;
import org.junit.Test;
-public class GeometryInternalExceptionTest {
+public class GeometryInternalErrorTest {
@Test
public void testMessage() {
// act
- final GeometryInternalException err = new GeometryInternalException();
+ final GeometryInternalError err = new GeometryInternalError();
// assert
final String msg = "An internal geometry error occurred. This most often indicates an " +
diff --git a/commons-geometry-enclosing/src/main/java/org/apache/commons/geometry/enclosing/WelzlEncloser.java b/commons-geometry-enclosing/src/main/java/org/apache/commons/geometry/enclosing/WelzlEncloser.java
index d94a0aa..9f9f772 100755
--- a/commons-geometry-enclosing/src/main/java/org/apache/commons/geometry/enclosing/WelzlEncloser.java
+++ b/commons-geometry-enclosing/src/main/java/org/apache/commons/geometry/enclosing/WelzlEncloser.java
@@ -20,7 +20,7 @@ import java.util.ArrayList;
import java.util.List;
import org.apache.commons.geometry.core.Point;
-import org.apache.commons.geometry.core.internal.GeometryInternalException;
+import org.apache.commons.geometry.core.internal.GeometryInternalError;
import org.apache.commons.geometry.core.precision.DoublePrecisionContext;
/** Class implementing Emo Welzl's algorithm to find the smallest enclosing ball in linear time.
@@ -98,7 +98,7 @@ public class WelzlEncloser<P extends Point<P>> implements Encloser<P> {
ball = moveToFrontBall(extreme, extreme.size(), support);
if (precision.lt(ball.getRadius(), savedBall.getRadius())) {
// this should never happen
- throw new GeometryInternalException();
+ throw new GeometryInternalError();
}
// it was an interesting point, move it to the front
diff --git a/commons-geometry-euclidean/src/main/java/org/apache/commons/geometry/euclidean/threed/rotation/QuaternionRotation.java b/commons-geometry-euclidean/src/main/java/org/apache/commons/geometry/euclidean/threed/rotation/QuaternionRotation.java
index 65f34c1..62e950a 100644
--- a/commons-geometry-euclidean/src/main/java/org/apache/commons/geometry/euclidean/threed/rotation/QuaternionRotation.java
+++ b/commons-geometry-euclidean/src/main/java/org/apache/commons/geometry/euclidean/threed/rotation/QuaternionRotation.java
@@ -19,7 +19,7 @@ package org.apache.commons.geometry.euclidean.threed.rotation;
import java.util.Objects;
import java.util.function.DoubleFunction;
-import org.apache.commons.geometry.core.internal.GeometryInternalException;
+import org.apache.commons.geometry.core.internal.GeometryInternalError;
import org.apache.commons.geometry.euclidean.internal.Vectors;
import org.apache.commons.geometry.euclidean.threed.AffineTransformMatrix3D;
import org.apache.commons.geometry.euclidean.threed.Vector3D;
@@ -382,7 +382,7 @@ public final class QuaternionRotation implements Rotation3D {
}
// all possibilities should have been covered above
- throw new GeometryInternalException();
+ throw new GeometryInternalError();
}
/** Get a sequence of angles around the given Tait-Bryan axes that produce a rotation equivalent