commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From er...@apache.org
Subject [commons-geometry] 04/12: Avoid several method having identical implementation.
Date Thu, 28 Nov 2019 14:12:12 GMT
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 d7fb844a13c56823155e9797844ab345c3375691
Author: Gilles Sadowski <gilles@harfang.homelinux.org>
AuthorDate: Thu Nov 28 13:48:15 2019 +0100

    Avoid several method having identical implementation.
    
    Aliases should call the "primary" method.
    
    Reported by "sonarcloud.io".
---
 .../commons/geometry/core/precision/EpsilonDoublePrecisionContext.java  | 2 +-
 .../main/java/org/apache/commons/geometry/euclidean/threed/Plane.java   | 2 +-
 .../apache/commons/geometry/spherical/twod/AbstractSubGreatCircle.java  | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/commons-geometry-core/src/main/java/org/apache/commons/geometry/core/precision/EpsilonDoublePrecisionContext.java
b/commons-geometry-core/src/main/java/org/apache/commons/geometry/core/precision/EpsilonDoublePrecisionContext.java
index 1bc6213..dfc9b34 100644
--- a/commons-geometry-core/src/main/java/org/apache/commons/geometry/core/precision/EpsilonDoublePrecisionContext.java
+++ b/commons-geometry-core/src/main/java/org/apache/commons/geometry/core/precision/EpsilonDoublePrecisionContext.java
@@ -56,7 +56,7 @@ public class EpsilonDoublePrecisionContext extends DoublePrecisionContext
{
      */
     @Override
     public double getMaxZero() {
-        return epsilon;
+        return getEpsilon();
     }
 
     /** {@inheritDoc} **/
diff --git a/commons-geometry-euclidean/src/main/java/org/apache/commons/geometry/euclidean/threed/Plane.java
b/commons-geometry-euclidean/src/main/java/org/apache/commons/geometry/euclidean/threed/Plane.java
index 14b423f..4fa7081 100644
--- a/commons-geometry-euclidean/src/main/java/org/apache/commons/geometry/euclidean/threed/Plane.java
+++ b/commons-geometry-euclidean/src/main/java/org/apache/commons/geometry/euclidean/threed/Plane.java
@@ -149,7 +149,7 @@ public final class Plane extends AbstractHyperplane<Vector3D>
      * @see #getW()
      */
     public Vector3D getNormal() {
-        return w;
+        return getW();
     }
 
     /** {@inheritDoc} */
diff --git a/commons-geometry-spherical/src/main/java/org/apache/commons/geometry/spherical/twod/AbstractSubGreatCircle.java
b/commons-geometry-spherical/src/main/java/org/apache/commons/geometry/spherical/twod/AbstractSubGreatCircle.java
index 1a314fd..0c1ba26 100644
--- a/commons-geometry-spherical/src/main/java/org/apache/commons/geometry/spherical/twod/AbstractSubGreatCircle.java
+++ b/commons-geometry-spherical/src/main/java/org/apache/commons/geometry/spherical/twod/AbstractSubGreatCircle.java
@@ -46,7 +46,7 @@ abstract class AbstractSubGreatCircle
     /** {@inheritDoc} */
     @Override
     public GreatCircle getHyperplane() {
-        return circle;
+        return getCircle();
     }
 
     /** {@inheritDoc} */


Mime
View raw message