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 2023/11/18 08:21:11 UTC

(commons-statistics) branch master updated (0db9bff -> 915cfd4)

This is an automated email from the ASF dual-hosted git repository.

aherbert pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/commons-statistics.git


    from 0db9bff  STATISTICS-71: Add StandardDeviation statistic
     new 32afdae  Checkstyle: Final class should be final
     new 915cfd4  Spotbugs: Make internal helper class final

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../test/java/org/apache/commons/statistics/descriptive/TestHelper.java | 2 +-
 .../apache/commons/statistics/distribution/ExtendedPrecisionTest.java   | 2 +-
 .../java/org/apache/commons/statistics/inference/BrentOptimizer.java    | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)


(commons-statistics) 01/02: Checkstyle: Final class should be final

Posted by ah...@apache.org.
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-statistics.git

commit 32afdae232e682bf295e1e1a1c44537ba5b5073c
Author: Alex Herbert <ah...@apache.org>
AuthorDate: Sat Nov 18 08:12:35 2023 +0000

    Checkstyle: Final class should be final
---
 .../test/java/org/apache/commons/statistics/descriptive/TestHelper.java | 2 +-
 .../apache/commons/statistics/distribution/ExtendedPrecisionTest.java   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/commons-statistics-descriptive/src/test/java/org/apache/commons/statistics/descriptive/TestHelper.java b/commons-statistics-descriptive/src/test/java/org/apache/commons/statistics/descriptive/TestHelper.java
index f7a84c8..0859b07 100644
--- a/commons-statistics-descriptive/src/test/java/org/apache/commons/statistics/descriptive/TestHelper.java
+++ b/commons-statistics-descriptive/src/test/java/org/apache/commons/statistics/descriptive/TestHelper.java
@@ -39,7 +39,7 @@ final class TestHelper {
      * A {@link DoubleTolerance} that considers finite values equal using the {@code ==} operator,
      * and all non-finite values equal.
      */
-    private static class EqualsNonFinite implements DoubleTolerance, Supplier<String> {
+    private static final class EqualsNonFinite implements DoubleTolerance, Supplier<String> {
         /** An instance. */
         static final EqualsNonFinite INSTANCE = new EqualsNonFinite();
 
diff --git a/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/ExtendedPrecisionTest.java b/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/ExtendedPrecisionTest.java
index 25011ee..8f7a25b 100644
--- a/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/ExtendedPrecisionTest.java
+++ b/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/ExtendedPrecisionTest.java
@@ -53,7 +53,7 @@ class ExtendedPrecisionTest {
      * Class to compute the root mean squared error (RMS).
      * @see <a href="https://en.wikipedia.org/wiki/Root_mean_square">Wikipedia: RMS</a>
      */
-    private static class RMS {
+    private static final class RMS {
         private double ss;
         private double max;
         private int n;


(commons-statistics) 02/02: Spotbugs: Make internal helper class final

Posted by ah...@apache.org.
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-statistics.git

commit 915cfd41b3905399a0d1cdf510c5d30a0aa439b6
Author: Alex Herbert <ah...@apache.org>
AuthorDate: Sat Nov 18 08:20:51 2023 +0000

    Spotbugs: Make internal helper class final
    
    Fixes CT_CONSTRUCTOR_THROW: Constructor can throw and is vunerable to
    finalizer attacks.
---
 .../java/org/apache/commons/statistics/inference/BrentOptimizer.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/commons-statistics-inference/src/main/java/org/apache/commons/statistics/inference/BrentOptimizer.java b/commons-statistics-inference/src/main/java/org/apache/commons/statistics/inference/BrentOptimizer.java
index 76ae6db..27bc7c5 100644
--- a/commons-statistics-inference/src/main/java/org/apache/commons/statistics/inference/BrentOptimizer.java
+++ b/commons-statistics-inference/src/main/java/org/apache/commons/statistics/inference/BrentOptimizer.java
@@ -43,7 +43,7 @@ import org.apache.commons.numbers.core.Precision;
  *
  * @since 1.1
  */
-class BrentOptimizer {
+final class BrentOptimizer {
     /** Golden section. (3 - sqrt(5)) / 2. */
     private static final double GOLDEN_SECTION = 0.3819660112501051;
     /** Minimum relative tolerance. 2 * eps = 2^-51. */