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 2025/09/24 13:15:49 UTC

(commons-geometry) 03/34: pmd fix: allow package level instantiation

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 e8555e415f4f5eb256cafe61c850c9d32ffd7304
Author: Alex Herbert <ah...@apache.org>
AuthorDate: Tue Sep 23 16:38:20 2025 +0100

    pmd fix: allow package level instantiation
---
 .../partitioning/bsp/AbstractRegionBSPTree.java    | 25 ++++++++++++++++++++++
 1 file changed, 25 insertions(+)

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 c2fe9375..058a0541 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
@@ -947,6 +947,11 @@ public abstract class AbstractRegionBSPTree<
     private static final class UnionOperator<P extends Point<P>, N extends AbstractRegionNode<P, N>>
         extends RegionMergeOperator<P, N> {
 
+        /** Create an instance. */
+        UnionOperator() {
+            // Allow package level instantiation
+        }
+
         /** {@inheritDoc} */
         @Override
         protected N mergeLeaf(final N node1, final N node2) {
@@ -966,6 +971,11 @@ public abstract class AbstractRegionBSPTree<
     private static final class IntersectionOperator<P extends Point<P>, N extends AbstractRegionNode<P, N>>
         extends RegionMergeOperator<P, N> {
 
+        /** Create an instance. */
+        IntersectionOperator() {
+            // Allow package level instantiation
+        }
+
         /** {@inheritDoc} */
         @Override
         protected N mergeLeaf(final N node1, final N node2) {
@@ -985,6 +995,11 @@ public abstract class AbstractRegionBSPTree<
     private static final class DifferenceOperator<P extends Point<P>, N extends AbstractRegionNode<P, N>>
         extends RegionMergeOperator<P, N> {
 
+        /** Create an instance. */
+        DifferenceOperator() {
+            // Allow package level instantiation
+        }
+
         /** {@inheritDoc} */
         @Override
         protected N mergeLeaf(final N node1, final N node2) {
@@ -1017,6 +1032,11 @@ public abstract class AbstractRegionBSPTree<
     private static final class XorOperator<P extends Point<P>, N extends AbstractRegionNode<P, N>>
         extends RegionMergeOperator<P, N> {
 
+        /** Create an instance. */
+        XorOperator() {
+            // Allow package level instantiation
+        }
+
         /** {@inheritDoc} */
         @Override
         protected N mergeLeaf(final N node1, final N node2) {
@@ -1052,6 +1072,11 @@ public abstract class AbstractRegionBSPTree<
         /** Flag set to true if the tree was modified during the operation. */
         private boolean modifiedTree;
 
+        /** Create an instance. */
+        Condenser() {
+            // Allow package level instantiation
+        }
+
         /** Condense the nodes in the subtree rooted at the given node. Redundant child nodes are
          * removed. The tree is invalidated if the tree structure was modified.
          * @param node the root node of the subtree to condense