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/09/29 14:07:23 UTC

[commons-numbers] 03/06: Make default constructor "private".

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

commit f0358f4c8a48b7fc21c51686d957a23f35c50e7a
Author: Gilles Sadowski <gi...@harfang.homelinux.org>
AuthorDate: Sun Sep 29 15:53:40 2019 +0200

    Make default constructor "private".
    
    Reported by "SonarQube".
---
 .../java/org/apache/commons/numbers/gamma/RegularizedGamma.java     | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/commons-numbers-gamma/src/main/java/org/apache/commons/numbers/gamma/RegularizedGamma.java b/commons-numbers-gamma/src/main/java/org/apache/commons/numbers/gamma/RegularizedGamma.java
index 8451196..e3eb69a 100644
--- a/commons-numbers-gamma/src/main/java/org/apache/commons/numbers/gamma/RegularizedGamma.java
+++ b/commons-numbers-gamma/src/main/java/org/apache/commons/numbers/gamma/RegularizedGamma.java
@@ -41,6 +41,9 @@ public class RegularizedGamma {
      * Class is immutable.
      */
     public static class P {
+        /** Prevent instantiation. */
+        private P() {}
+
         /**
          * Computes the regularized gamma function \( P(a, x) \).
          *
@@ -125,6 +128,9 @@ public class RegularizedGamma {
      * Class is immutable.
      */
     public static class Q {
+        /** Prevent instantiation. */
+        private Q() {}
+
         /**
          * Computes the regularized gamma function \( Q(a, x) = 1 - P(a, x) \).
          *