You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by er...@apache.org on 2019/11/26 16:07:22 UTC
[commons-geometry] 01/03: Use "diamond" operator.
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 5ca8b9cc6c744c656838be587f4c73873b778c4f
Author: Gilles Sadowski <gi...@harfang.homelinux.org>
AuthorDate: Tue Nov 26 16:39:24 2019 +0100
Use "diamond" operator.
Reported by "sonarcloud.io".
---
.../commons/geometry/core/partitioning/bsp/AbstractRegionBSPTree.java | 4 ++--
.../commons/geometry/core/partitioning/bsp/AttributeBSPTree.java | 2 +-
.../org/apache/commons/geometry/euclidean/threed/RegionBSPTree3D.java | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/commons-geometry-core/src/main/java/org/apache/commons/geometry/core/partitioning/bsp/AbstractRegionBSPTree.java b/commons-geometry-core/src/main/java/org/apache/commons/geometry/core/partitioning/bsp/AbstractRegionBSPTree.java
index 9a867a8..5bce738 100644
--- a/commons-geometry-core/src/main/java/org/apache/commons/geometry/core/partitioning/bsp/AbstractRegionBSPTree.java
+++ b/commons-geometry-core/src/main/java/org/apache/commons/geometry/core/partitioning/bsp/AbstractRegionBSPTree.java
@@ -242,7 +242,7 @@ public abstract class AbstractRegionBSPTree<
splitPlus = plus.isEmpty() ? null : plus;
}
- return new Split<T>(splitMinus, splitPlus);
+ return new Split<>(splitMinus, splitPlus);
}
/** Get the size-related properties for the region. The value is computed
@@ -498,7 +498,7 @@ public abstract class AbstractRegionBSPTree<
}
}
- return new RegionCutBoundary<P>(insideFacing.build(), outsideFacing.build());
+ return new RegionCutBoundary<>(insideFacing.build(), outsideFacing.build());
}
/** Recursive method to characterize a convex subhyperplane with respect to the region's
diff --git a/commons-geometry-core/src/main/java/org/apache/commons/geometry/core/partitioning/bsp/AttributeBSPTree.java b/commons-geometry-core/src/main/java/org/apache/commons/geometry/core/partitioning/bsp/AttributeBSPTree.java
index d7fecd6..065f08f 100644
--- a/commons-geometry-core/src/main/java/org/apache/commons/geometry/core/partitioning/bsp/AttributeBSPTree.java
+++ b/commons-geometry-core/src/main/java/org/apache/commons/geometry/core/partitioning/bsp/AttributeBSPTree.java
@@ -52,7 +52,7 @@ public class AttributeBSPTree<P extends Point<P>, T>
/** {@inheritDoc} */
@Override
protected AttributeNode<P, T> createNode() {
- return new AttributeNode<P, T>(this);
+ return new AttributeNode<>(this);
}
/** {@inheritDoc} */
diff --git a/commons-geometry-euclidean/src/main/java/org/apache/commons/geometry/euclidean/threed/RegionBSPTree3D.java b/commons-geometry-euclidean/src/main/java/org/apache/commons/geometry/euclidean/threed/RegionBSPTree3D.java
index 23e5792..c2f9ebd 100644
--- a/commons-geometry-euclidean/src/main/java/org/apache/commons/geometry/euclidean/threed/RegionBSPTree3D.java
+++ b/commons-geometry-euclidean/src/main/java/org/apache/commons/geometry/euclidean/threed/RegionBSPTree3D.java
@@ -659,7 +659,7 @@ public final class RegionBSPTree3D extends AbstractRegionBSPTree<Vector3D, Regio
sumZ * barycenterScale);
}
- return new RegionSizeProperties<Vector3D>(size, barycenter);
+ return new RegionSizeProperties<>(size, barycenter);
}
/** Add the facet contribution of the given node cut boundary. If {@code reverse} is true,