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

commit dc639967c22d99ff4873e4065352fdc0f11cd591
Author: Alex Herbert <[email protected]>
AuthorDate: Sun Aug 22 21:29:29 2021 +0100

    Fix localization formats used by ZeroException.
    
    The ZeroException preprends zero to the arguments. The {0} corresponds
    to zero. All arguments to be formatted must start at {1}.
---
 .../commons/math4/legacy/exception/util/LocalizedFormats.java       | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git 
a/commons-math-legacy-exception/src/main/java/org/apache/commons/math4/legacy/exception/util/LocalizedFormats.java
 
b/commons-math-legacy-exception/src/main/java/org/apache/commons/math4/legacy/exception/util/LocalizedFormats.java
index 6bf29f5..5420bf0 100644
--- 
a/commons-math-legacy-exception/src/main/java/org/apache/commons/math4/legacy/exception/util/LocalizedFormats.java
+++ 
b/commons-math-legacy-exception/src/main/java/org/apache/commons/math4/legacy/exception/util/LocalizedFormats.java
@@ -91,7 +91,7 @@ public enum LocalizedFormats implements Localizable {
     DIMENSIONS_MISMATCH("dimensions mismatch"), /* keep */
     DISCRETE_CUMULATIVE_PROBABILITY_RETURNED_NAN("Discrete cumulative 
probability function returned NaN for argument {0}"),
     DISTRIBUTION_NOT_LOADED("distribution not loaded"),
-    DUPLICATED_ABSCISSA_DIVISION_BY_ZERO("duplicated abscissa {0} causes 
division by zero"),
+    DUPLICATED_ABSCISSA_DIVISION_BY_ZERO("duplicated abscissa {1} causes 
division by zero"),
     EDGE_CONNECTED_TO_ONE_FACET("edge joining points ({0}, {1}, {2}) and ({3}, 
{4}, {5}) is connected to one facet only"),
     ELITISM_RATE("elitism rate ({0})"),
     EMPTY_CLUSTER_IN_K_MEANS("empty cluster in k-means"),
@@ -281,8 +281,8 @@ public enum LocalizedFormats implements Localizable {
     NUMBER_OF_SUCCESS_LARGER_THAN_POPULATION_SIZE("number of successes ({0}) 
must be less than or equal to population size ({1})"),
     NUMERATOR_OVERFLOW_AFTER_MULTIPLY("overflow, numerator too large after 
multiply: {0}"),
     N_POINTS_GAUSS_LEGENDRE_INTEGRATOR_NOT_SUPPORTED("{0} points 
Legendre-Gauss integrator not supported, number of points must be in the 
{1}-{2} range"),
-    OBSERVED_COUNTS_ALL_ZERO("observed counts are all 0 in observed array 
{0}"),
-    OBSERVED_COUNTS_BOTTH_ZERO_FOR_ENTRY("observed counts are both zero for 
entry {0}"),
+    OBSERVED_COUNTS_ALL_ZERO("observed counts are all 0 in observed array 
{1}"),
+    OBSERVED_COUNTS_BOTTH_ZERO_FOR_ENTRY("observed counts are both zero for 
entry {1}"),
     BOBYQA_BOUND_DIFFERENCE_CONDITION("the difference between the upper and 
lower bound must be larger than twice the initial trust region radius ({0})"),
     OUT_OF_BOUNDS_QUANTILE_VALUE("out of bounds quantile value: {0}, must be 
in (0, 100]"),
     OUT_OF_BOUNDS_CONFIDENCE_LEVEL("out of bounds confidence level {0}, must 
be between {1} and {2}"),

Reply via email to