From 47e5bb380eefdbd0217be98295c54b03a38b6be9 Mon Sep 17 00:00:00 2001 From: Sebastien Brisard Date: Wed, 12 Sep 2012 04:43:38 +0000 Subject: [PATCH] Removed LocalizedFormats.ENTRY previously introduced in r1383747, as LocalizedFormats.INDEX will do nicely. git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1383770 13f79535-47bb-0310-9956-ffa450edef68 --- .../commons/math3/exception/util/LocalizedFormats.java | 1 - .../org/apache/commons/math3/linear/ArrayFieldVector.java | 8 ++++---- .../math3/exception/util/LocalizedFormats_fr.properties | 1 - .../math3/exception/util/LocalizedFormatsTest.java | 2 +- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/main/java/org/apache/commons/math3/exception/util/LocalizedFormats.java b/src/main/java/org/apache/commons/math3/exception/util/LocalizedFormats.java index acaf826d1..27c21fbc3 100644 --- a/src/main/java/org/apache/commons/math3/exception/util/LocalizedFormats.java +++ b/src/main/java/org/apache/commons/math3/exception/util/LocalizedFormats.java @@ -97,7 +97,6 @@ public enum LocalizedFormats implements Localizable { EMPTY_SELECTED_ROW_INDEX_ARRAY("empty selected row index array"), EMPTY_STRING_FOR_IMAGINARY_CHARACTER("empty string for imaginary character"), ENDPOINTS_NOT_AN_INTERVAL("endpoints do not specify an interval: [{0}, {1}]"), - ENTRY("entry {0}"), EQUAL_VERTICES_IN_SIMPLEX("equal vertices {0} and {1} in simplex configuration"), EULER_ANGLES_SINGULARITY("Euler angles singularity"), EVALUATION("evaluation"), /* keep */ diff --git a/src/main/java/org/apache/commons/math3/linear/ArrayFieldVector.java b/src/main/java/org/apache/commons/math3/linear/ArrayFieldVector.java index fb213d489..28b9d738a 100644 --- a/src/main/java/org/apache/commons/math3/linear/ArrayFieldVector.java +++ b/src/main/java/org/apache/commons/math3/linear/ArrayFieldVector.java @@ -560,7 +560,7 @@ public class ArrayFieldVector> implements FieldVector< try { out[i] = one.divide(data[i]); } catch (final MathArithmeticException e) { - throw new MathArithmeticException(LocalizedFormats.ENTRY, i); + throw new MathArithmeticException(LocalizedFormats.INDEX, i); } } return new ArrayFieldVector(field, out, false); @@ -573,7 +573,7 @@ public class ArrayFieldVector> implements FieldVector< try { data[i] = one.divide(data[i]); } catch (final MathArithmeticException e) { - throw new MathArithmeticException(LocalizedFormats.ENTRY, i); + throw new MathArithmeticException(LocalizedFormats.INDEX, i); } } return this; @@ -623,7 +623,7 @@ public class ArrayFieldVector> implements FieldVector< try { out[i] = data[i].divide(v.getEntry(i)); } catch (final MathArithmeticException e) { - throw new MathArithmeticException(LocalizedFormats.ENTRY, i); + throw new MathArithmeticException(LocalizedFormats.INDEX, i); } } return new ArrayFieldVector(field, out, false); @@ -646,7 +646,7 @@ public class ArrayFieldVector> implements FieldVector< try { out[i] = data[i].divide(v.data[i]); } catch (final MathArithmeticException e) { - throw new MathArithmeticException(LocalizedFormats.ENTRY, i); + throw new MathArithmeticException(LocalizedFormats.INDEX, i); } } return new ArrayFieldVector(field, out, false); diff --git a/src/main/resources/assets/org/apache/commons/math3/exception/util/LocalizedFormats_fr.properties b/src/main/resources/assets/org/apache/commons/math3/exception/util/LocalizedFormats_fr.properties index 15a16ce2d..7a18b8fde 100644 --- a/src/main/resources/assets/org/apache/commons/math3/exception/util/LocalizedFormats_fr.properties +++ b/src/main/resources/assets/org/apache/commons/math3/exception/util/LocalizedFormats_fr.properties @@ -69,7 +69,6 @@ EMPTY_SELECTED_COLUMN_INDEX_ARRAY = tableau des indices de colonnes s\u00e9lecti EMPTY_SELECTED_ROW_INDEX_ARRAY = tableau des indices de lignes s\u00e9lectionn\u00e9es vide EMPTY_STRING_FOR_IMAGINARY_CHARACTER = cha\u00eene vide pour le caract\u00e8 imaginaire ENDPOINTS_NOT_AN_INTERVAL = les bornes ne d\u00e9finissent pas un intervalle : [{0}, {1}] -ENTRY = \u00e9l\u00e9ment {0} EQUAL_VERTICES_IN_SIMPLEX = sommets {0} et {1} \u00e9gaux dans la configuration du simplex EULER_ANGLES_SINGULARITY = singularit\u00e9 d''angles d''Euler EVALUATION = \u00e9valuation diff --git a/src/test/java/org/apache/commons/math3/exception/util/LocalizedFormatsTest.java b/src/test/java/org/apache/commons/math3/exception/util/LocalizedFormatsTest.java index 8f8928ebe..22a0a5288 100644 --- a/src/test/java/org/apache/commons/math3/exception/util/LocalizedFormatsTest.java +++ b/src/test/java/org/apache/commons/math3/exception/util/LocalizedFormatsTest.java @@ -36,7 +36,7 @@ public class LocalizedFormatsTest { @Test public void testMessageNumber() { - Assert.assertEquals(311, LocalizedFormats.values().length); + Assert.assertEquals(310, LocalizedFormats.values().length); } @Test