You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ah...@apache.org on 2020/02/18 00:42:14 UTC
[commons-geometry] 03/04: Remove redundant field initialisers
This is an automated email from the ASF dual-hosted git repository.
aherbert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-geometry.git
commit 826ff8836ed8bb805abb67c3ec775bf7750a1aad
Author: Alex Herbert <a....@sussex.ac.uk>
AuthorDate: Tue Feb 18 00:37:17 2020 +0000
Remove redundant field initialisers
---
.../commons/geometry/core/partitioning/bsp/AbstractBSPTree.java | 2 +-
.../geometry/euclidean/internal/AbstractPathConnector.java | 2 +-
.../apache/commons/geometry/euclidean/oned/RegionBSPTree1D.java | 8 ++++----
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/commons-geometry-core/src/main/java/org/apache/commons/geometry/core/partitioning/bsp/AbstractBSPTree.java b/commons-geometry-core/src/main/java/org/apache/commons/geometry/core/partitioning/bsp/AbstractBSPTree.java
index 060f995..b5c23b8 100644
--- a/commons-geometry-core/src/main/java/org/apache/commons/geometry/core/partitioning/bsp/AbstractBSPTree.java
+++ b/commons-geometry-core/src/main/java/org/apache/commons/geometry/core/partitioning/bsp/AbstractBSPTree.java
@@ -51,7 +51,7 @@ public abstract class AbstractBSPTree<P extends Point<P>, N extends AbstractBSPT
* a structural change occurs in the tree and is used to determine when cached values
* must be recomputed.
*/
- private int version = 0;
+ private int version;
/** {@inheritDoc} */
@Override
diff --git a/commons-geometry-euclidean/src/main/java/org/apache/commons/geometry/euclidean/internal/AbstractPathConnector.java b/commons-geometry-euclidean/src/main/java/org/apache/commons/geometry/euclidean/internal/AbstractPathConnector.java
index cb94308..fee4343 100644
--- a/commons-geometry-euclidean/src/main/java/org/apache/commons/geometry/euclidean/internal/AbstractPathConnector.java
+++ b/commons-geometry-euclidean/src/main/java/org/apache/commons/geometry/euclidean/internal/AbstractPathConnector.java
@@ -278,7 +278,7 @@ public abstract class AbstractPathConnector<E extends AbstractPathConnector.Conn
private E previous;
/** Flag set to true when this element has exported its value to a path. */
- private boolean exported = false;
+ private boolean exported;
/** Return true if the instance is connected to another element's start point.
* @return true if the instance has a next element
diff --git a/commons-geometry-euclidean/src/main/java/org/apache/commons/geometry/euclidean/oned/RegionBSPTree1D.java b/commons-geometry-euclidean/src/main/java/org/apache/commons/geometry/euclidean/oned/RegionBSPTree1D.java
index fe19261..6d4ca39 100644
--- a/commons-geometry-euclidean/src/main/java/org/apache/commons/geometry/euclidean/oned/RegionBSPTree1D.java
+++ b/commons-geometry-euclidean/src/main/java/org/apache/commons/geometry/euclidean/oned/RegionBSPTree1D.java
@@ -502,16 +502,16 @@ public final class RegionBSPTree1D extends AbstractRegionBSPTree<Vector1D, Regio
*/
private static final class RegionSizePropertiesVisitor implements BiConsumer<OrientedPoint, OrientedPoint> {
/** Number of inside intervals visited. */
- private int count = 0;
+ private int count;
/** Total computed size of all inside regions. */
- private double size = 0;
+ private double size;
/** Raw sum of the barycenters of each inside interval. */
- private double rawBarycenterSum = 0;
+ private double rawBarycenterSum;
/** The sum of the barycenter of each inside interval, scaled by the size of the interval. */
- private double scaledBarycenterSum = 0;
+ private double scaledBarycenterSum;
/** {@inheritDoc} */
@Override