From 514680c03eb3792a9dccd870008a00cef76175e6 Mon Sep 17 00:00:00 2001 From: Luc Maisonobe Date: Sun, 6 Sep 2009 08:38:59 +0000 Subject: [PATCH] fixed checkstyle errors about utility classes constructors git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@811780 13f79535-47bb-0310-9956-ffa450edef68 --- .../math/analysis/solvers/UnivariateRealSolverUtils.java | 6 ++++++ .../java/org/apache/commons/math/complex/ComplexField.java | 6 ++++++ .../org/apache/commons/math/fraction/BigFractionField.java | 6 ++++++ .../org/apache/commons/math/fraction/FractionField.java | 6 ++++++ .../apache/commons/math/stat/inference/OneWayAnovaImpl.java | 2 +- .../java/org/apache/commons/math/util/BigRealField.java | 6 ++++++ 6 files changed, 31 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/apache/commons/math/analysis/solvers/UnivariateRealSolverUtils.java b/src/main/java/org/apache/commons/math/analysis/solvers/UnivariateRealSolverUtils.java index 5179c9b4b..7482747b2 100644 --- a/src/main/java/org/apache/commons/math/analysis/solvers/UnivariateRealSolverUtils.java +++ b/src/main/java/org/apache/commons/math/analysis/solvers/UnivariateRealSolverUtils.java @@ -233,9 +233,15 @@ public class UnivariateRealSolverUtils { *

We use here the Initialization On Demand Holder Idiom.

*/ private static class LazyHolder { + + /** Private constructor. */ + private LazyHolder() { + } + /** Cached solver factory */ private static final UnivariateRealSolverFactory FACTORY = UnivariateRealSolverFactory.newInstance(); + } } diff --git a/src/main/java/org/apache/commons/math/complex/ComplexField.java b/src/main/java/org/apache/commons/math/complex/ComplexField.java index 489bc2d50..99705806a 100644 --- a/src/main/java/org/apache/commons/math/complex/ComplexField.java +++ b/src/main/java/org/apache/commons/math/complex/ComplexField.java @@ -61,8 +61,14 @@ public class ComplexField implements Field, Serializable { *

We use here the Initialization On Demand Holder Idiom.

*/ private static class LazyHolder { + + /** Private constructor. */ + private LazyHolder() { + } + /** Cached field instance. */ private static final ComplexField INSTANCE = new ComplexField(); + } /** Handle deserialization of the singleton. diff --git a/src/main/java/org/apache/commons/math/fraction/BigFractionField.java b/src/main/java/org/apache/commons/math/fraction/BigFractionField.java index 9328f675d..44dce3567 100644 --- a/src/main/java/org/apache/commons/math/fraction/BigFractionField.java +++ b/src/main/java/org/apache/commons/math/fraction/BigFractionField.java @@ -61,8 +61,14 @@ public class BigFractionField implements Field, Serializable { *

We use here the Initialization On Demand Holder Idiom.

*/ private static class LazyHolder { + + /** Private constructor. */ + private LazyHolder() { + } + /** Cached field instance. */ private static final BigFractionField INSTANCE = new BigFractionField(); + } /** Handle deserialization of the singleton. diff --git a/src/main/java/org/apache/commons/math/fraction/FractionField.java b/src/main/java/org/apache/commons/math/fraction/FractionField.java index 1096c7d9c..dbf0c40df 100644 --- a/src/main/java/org/apache/commons/math/fraction/FractionField.java +++ b/src/main/java/org/apache/commons/math/fraction/FractionField.java @@ -61,8 +61,14 @@ public class FractionField implements Field, Serializable { *

We use here the Initialization On Demand Holder Idiom.

*/ private static class LazyHolder { + + /** Private constructor. */ + private LazyHolder() { + } + /** Cached field instance. */ private static final FractionField INSTANCE = new FractionField(); + } /** Handle deserialization of the singleton. diff --git a/src/main/java/org/apache/commons/math/stat/inference/OneWayAnovaImpl.java b/src/main/java/org/apache/commons/math/stat/inference/OneWayAnovaImpl.java index 27a00773e..52986aadf 100644 --- a/src/main/java/org/apache/commons/math/stat/inference/OneWayAnovaImpl.java +++ b/src/main/java/org/apache/commons/math/stat/inference/OneWayAnovaImpl.java @@ -199,7 +199,7 @@ public class OneWayAnovaImpl implements OneWayAnova { * @param dfwg degrees of freedom in denominator (within groups) * @param F statistic */ - AnovaStats(int dfbg, int dfwg, double F) { + public AnovaStats(int dfbg, int dfwg, double F) { this.dfbg = dfbg; this.dfwg = dfwg; this.F = F; diff --git a/src/main/java/org/apache/commons/math/util/BigRealField.java b/src/main/java/org/apache/commons/math/util/BigRealField.java index 775ec0457..0f21c6895 100644 --- a/src/main/java/org/apache/commons/math/util/BigRealField.java +++ b/src/main/java/org/apache/commons/math/util/BigRealField.java @@ -61,8 +61,14 @@ public class BigRealField implements Field, Serializable { *

We use here the Initialization On Demand Holder Idiom.

*/ private static class LazyHolder { + + /** Private constructor. */ + private LazyHolder() { + } + /** Cached field instance. */ private static final BigRealField INSTANCE = new BigRealField(); + } /** Handle deserialization of the singleton.