Minor Improvement:
* Redundant Field Initializer
diff --git a/commons-geometry-euclidean/src/main/java/org/apache/commons/geometry/euclidean/threed/Planes.java b/commons-geometry-euclidean/src/main/java/org/apache/commons/geometry/euclidean/threed/Planes.java
index 9e265aa..21d69e7 100644
--- a/commons-geometry-euclidean/src/main/java/org/apache/commons/geometry/euclidean/threed/Planes.java
+++ b/commons-geometry-euclidean/src/main/java/org/apache/commons/geometry/euclidean/threed/Planes.java
@@ -637,7 +637,7 @@
private double crossSumZ;
/** If true, an exception will be thrown if the point sequence is discovered to be non-convex. */
- private boolean requireConvex = false;
+ private boolean requireConvex;
/** List that unique vertices discovered in the input sequence will be added to. */
private List<? super Vector3D> uniqueVertexOutput;
diff --git a/commons-geometry-euclidean/src/main/java/org/apache/commons/geometry/euclidean/threed/mesh/SimpleTriangleMesh.java b/commons-geometry-euclidean/src/main/java/org/apache/commons/geometry/euclidean/threed/mesh/SimpleTriangleMesh.java
index 3c5b41d..1e70dec 100644
--- a/commons-geometry-euclidean/src/main/java/org/apache/commons/geometry/euclidean/threed/mesh/SimpleTriangleMesh.java
+++ b/commons-geometry-euclidean/src/main/java/org/apache/commons/geometry/euclidean/threed/mesh/SimpleTriangleMesh.java
@@ -376,7 +376,7 @@
private final class FaceIterator<T> implements Iterator<T> {
/** The current index of the iterator. */
- private int index = 0;
+ private int index;
/** Function to apply to each face in the mesh. */
private final Function<? super TriangleMesh.Face, T> fn;
@@ -428,7 +428,7 @@
private final DoublePrecisionContext precision;
/** Flag set to true once a mesh is constructed from this builder. */
- private boolean built = false;
+ private boolean built;
/** Construct a new builder.
* @param precision precision context used for floating point comparisons; may
diff --git a/commons-geometry-euclidean/src/main/java/org/apache/commons/geometry/euclidean/twod/path/LinePath.java b/commons-geometry-euclidean/src/main/java/org/apache/commons/geometry/euclidean/twod/path/LinePath.java
index 25a0272..71124eb 100644
--- a/commons-geometry-euclidean/src/main/java/org/apache/commons/geometry/euclidean/twod/path/LinePath.java
+++ b/commons-geometry-euclidean/src/main/java/org/apache/commons/geometry/euclidean/twod/path/LinePath.java
@@ -458,10 +458,10 @@
*/
public static final class Builder {
/** Line subsets appended to the path. */
- private List<LineConvexSubset> appended = null;
+ private List<LineConvexSubset> appended;
/** Line subsets prepended to the path. */
- private List<LineConvexSubset> prepended = null;
+ private List<LineConvexSubset> prepended;
/** Precision context used when creating line segments directly from vertices. */
private DoublePrecisionContext precision;
diff --git a/commons-geometry-hull/src/main/java/org/apache/commons/geometry/hull/euclidean/twod/AbstractConvexHullGenerator2D.java b/commons-geometry-hull/src/main/java/org/apache/commons/geometry/hull/euclidean/twod/AbstractConvexHullGenerator2D.java
index fd5abd3..be9fa95 100644
--- a/commons-geometry-hull/src/main/java/org/apache/commons/geometry/hull/euclidean/twod/AbstractConvexHullGenerator2D.java
+++ b/commons-geometry-hull/src/main/java/org/apache/commons/geometry/hull/euclidean/twod/AbstractConvexHullGenerator2D.java
@@ -68,7 +68,7 @@
/** {@inheritDoc} */
@Override
public ConvexHull2D generate(final Collection<Vector2D> points) {
- Collection<Vector2D> hullVertices = null;
+ Collection<Vector2D> hullVertices;
if (points.size() < 2) {
hullVertices = points;
} else {
diff --git a/commons-geometry-spherical/src/main/java/org/apache/commons/geometry/spherical/twod/GreatArcPath.java b/commons-geometry-spherical/src/main/java/org/apache/commons/geometry/spherical/twod/GreatArcPath.java
index 87631ac..cff1995 100644
--- a/commons-geometry-spherical/src/main/java/org/apache/commons/geometry/spherical/twod/GreatArcPath.java
+++ b/commons-geometry-spherical/src/main/java/org/apache/commons/geometry/spherical/twod/GreatArcPath.java
@@ -283,10 +283,10 @@
*/
public static final class Builder {
/** Arcs appended to the path. */
- private List<GreatArc> appendedArcs = null;
+ private List<GreatArc> appendedArcs;
/** Arcs prepended to the path. */
- private List<GreatArc> prependedArcs = null;
+ private List<GreatArc> prependedArcs;
/** Precision context used when creating arcs directly from points. */
private DoublePrecisionContext precision;