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-rng.git

commit d6ee9ba5b75fe8b33a1b2eeead29de614f69b69a
Author: Alex Herbert <[email protected]>
AuthorDate: Tue Apr 14 15:55:30 2026 +0100

    PMD: allow public members in non public type
    
    Added exclusions to allow build using PMD 7.21.0.
    
    See also: https://github.com/pmd/pmd/issues/6477
---
 .../commons/rng/sampling/distribution/InternalUtils.java       |  4 ++++
 src/conf/pmd/pmd-ruleset.xml                                   | 10 ++++++++++
 2 files changed, 14 insertions(+)

diff --git 
a/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution/InternalUtils.java
 
b/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution/InternalUtils.java
index 24b221ed..471c6ad5 100644
--- 
a/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution/InternalUtils.java
+++ 
b/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution/InternalUtils.java
@@ -271,6 +271,10 @@ final class InternalUtils {
      * It allows to allocate a cache of precomputed values.
      * In case of cache miss, computation is performed by a call to
      * {@link InternalGamma#logGamma(double)}.
+     *
+     * <p>TODO: Remove public modifiers in next major release. This class is
+     * effectively package-private but changing triggers a false-positive
+     * binary compatibility failure using japicmp.
      */
     public static final class FactorialLog {
         /**
diff --git a/src/conf/pmd/pmd-ruleset.xml b/src/conf/pmd/pmd-ruleset.xml
index a716e49c..1c30be53 100644
--- a/src/conf/pmd/pmd-ruleset.xml
+++ b/src/conf/pmd/pmd-ruleset.xml
@@ -240,6 +240,16 @@
         
value="./ancestor-or-self::ClassDeclaration[@SimpleName='LargeMeanPoissonSamplerState']"/>
     </properties>
   </rule>
+  <rule ref="category/java/design.xml/PublicMemberInNonPublicType">
+    <properties>
+      <!-- AbstractWell.IndexTable is a protected class for use in derived 
classes of the
+        public outer class. InternalUtils.FactorialLog should be 
package-private but this
+        change is not allowed by japicmp (false positive). -->
+      <property name="violationSuppressXPath"
+        value="./ancestor-or-self::ClassDeclaration[@SimpleName='IndexTable'
+          or @SimpleName='FactorialLog']"/>
+    </properties>
+  </rule>
 
   <rule ref="category/java/documentation.xml/CommentRequired">
     <properties>

Reply via email to