commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1533566 - in /commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3: builder/ToStringBuilderTest.java exception/ExceptionUtilsTest.java text/ExtendedMessageFormatTest.java
Date Fri, 18 Oct 2013 17:21:23 GMT
Author: sebb
Date: Fri Oct 18 17:21:23 2013
New Revision: 1533566

URL: http://svn.apache.org/r1533566
Log:
It's confusing to re-use field names locally

Modified:
    commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/builder/ToStringBuilderTest.java
    commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/exception/ExceptionUtilsTest.java
    commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/text/ExtendedMessageFormatTest.java

Modified: commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/builder/ToStringBuilderTest.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/builder/ToStringBuilderTest.java?rev=1533566&r1=1533565&r2=1533566&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/builder/ToStringBuilderTest.java
(original)
+++ commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/builder/ToStringBuilderTest.java
Fri Oct 18 17:21:23 2013
@@ -156,8 +156,8 @@ public class ToStringBuilderTest {
     @Test
     public void testReflectionObjectArray() {
         Object[] array = new Object[] { null, base, new int[] { 3, 6 } };
-        final String baseStr = this.toBaseString(array);
-        assertEquals(baseStr + "[{<null>,5,{3,6}}]", ToStringBuilder.reflectionToString(array));
+        final String baseString = this.toBaseString(array);
+        assertEquals(baseString + "[{<null>,5,{3,6}}]", ToStringBuilder.reflectionToString(array));
         array = null;
         assertReflectionArray("<null>", array);
     }
@@ -165,8 +165,8 @@ public class ToStringBuilderTest {
     @Test
     public void testReflectionLongArray() {
         long[] array = new long[] { 1, 2, -3, 4 };
-        final String baseStr = this.toBaseString(array);
-        assertEquals(baseStr + "[{1,2,-3,4}]", ToStringBuilder.reflectionToString(array));
+        final String baseString = this.toBaseString(array);
+        assertEquals(baseString + "[{1,2,-3,4}]", ToStringBuilder.reflectionToString(array));
         array = null;
         assertReflectionArray("<null>", array);
     }
@@ -174,8 +174,8 @@ public class ToStringBuilderTest {
     @Test
     public void testReflectionIntArray() {
         int[] array = new int[] { 1, 2, -3, 4 };
-        final String baseStr = this.toBaseString(array);
-        assertEquals(baseStr + "[{1,2,-3,4}]", ToStringBuilder.reflectionToString(array));
+        final String baseString = this.toBaseString(array);
+        assertEquals(baseString + "[{1,2,-3,4}]", ToStringBuilder.reflectionToString(array));
         array = null;
         assertReflectionArray("<null>", array);
     }
@@ -183,8 +183,8 @@ public class ToStringBuilderTest {
     @Test
     public void testReflectionShortArray() {
         short[] array = new short[] { 1, 2, -3, 4 };
-        final String baseStr = this.toBaseString(array);
-        assertEquals(baseStr + "[{1,2,-3,4}]", ToStringBuilder.reflectionToString(array));
+        final String baseString = this.toBaseString(array);
+        assertEquals(baseString + "[{1,2,-3,4}]", ToStringBuilder.reflectionToString(array));
         array = null;
         assertReflectionArray("<null>", array);
     }
@@ -192,8 +192,8 @@ public class ToStringBuilderTest {
     @Test
     public void testReflectionyteArray() {
         byte[] array = new byte[] { 1, 2, -3, 4 };
-        final String baseStr = this.toBaseString(array);
-        assertEquals(baseStr + "[{1,2,-3,4}]", ToStringBuilder.reflectionToString(array));
+        final String baseString = this.toBaseString(array);
+        assertEquals(baseString + "[{1,2,-3,4}]", ToStringBuilder.reflectionToString(array));
         array = null;
         assertReflectionArray("<null>", array);
     }
@@ -201,8 +201,8 @@ public class ToStringBuilderTest {
     @Test
     public void testReflectionCharArray() {
         char[] array = new char[] { 'A', '2', '_', 'D' };
-        final String baseStr = this.toBaseString(array);
-        assertEquals(baseStr + "[{A,2,_,D}]", ToStringBuilder.reflectionToString(array));
+        final String baseString = this.toBaseString(array);
+        assertEquals(baseString + "[{A,2,_,D}]", ToStringBuilder.reflectionToString(array));
         array = null;
         assertReflectionArray("<null>", array);
     }
@@ -210,8 +210,8 @@ public class ToStringBuilderTest {
     @Test
     public void testReflectionDoubleArray() {
         double[] array = new double[] { 1.0, 2.9876, -3.00001, 4.3 };
-        final String baseStr = this.toBaseString(array);
-        assertEquals(baseStr + "[{1.0,2.9876,-3.00001,4.3}]", ToStringBuilder.reflectionToString(array));
+        final String baseString = this.toBaseString(array);
+        assertEquals(baseString + "[{1.0,2.9876,-3.00001,4.3}]", ToStringBuilder.reflectionToString(array));
         array = null;
         assertReflectionArray("<null>", array);
     }
@@ -219,8 +219,8 @@ public class ToStringBuilderTest {
     @Test
     public void testReflectionFloatArray() {
         float[] array = new float[] { 1.0f, 2.9876f, -3.00001f, 4.3f };
-        final String baseStr = this.toBaseString(array);
-        assertEquals(baseStr + "[{1.0,2.9876,-3.00001,4.3}]", ToStringBuilder.reflectionToString(array));
+        final String baseString = this.toBaseString(array);
+        assertEquals(baseString + "[{1.0,2.9876,-3.00001,4.3}]", ToStringBuilder.reflectionToString(array));
         array = null;
         assertReflectionArray("<null>", array);
     }
@@ -228,8 +228,8 @@ public class ToStringBuilderTest {
     @Test
     public void testReflectionBooleanArray() {
         boolean[] array = new boolean[] { true, false, false };
-        final String baseStr = this.toBaseString(array);
-        assertEquals(baseStr + "[{true,false,false}]", ToStringBuilder.reflectionToString(array));
+        final String baseString = this.toBaseString(array);
+        assertEquals(baseString + "[{true,false,false}]", ToStringBuilder.reflectionToString(array));
         array = null;
         assertReflectionArray("<null>", array);
     }
@@ -239,8 +239,8 @@ public class ToStringBuilderTest {
     @Test
     public void testReflectionFloatArrayArray() {
         float[][] array = new float[][] { { 1.0f, 2.29686f }, null, { Float.NaN } };
-        final String baseStr = this.toBaseString(array);
-        assertEquals(baseStr + "[{{1.0,2.29686},<null>,{NaN}}]", ToStringBuilder.reflectionToString(array));
+        final String baseString = this.toBaseString(array);
+        assertEquals(baseString + "[{{1.0,2.29686},<null>,{NaN}}]", ToStringBuilder.reflectionToString(array));
         array = null;
         assertReflectionArray("<null>", array);
     }
@@ -249,8 +249,8 @@ public class ToStringBuilderTest {
     @Test
     public void testReflectionLongArrayArray() {
         long[][] array = new long[][] { { 1, 2 }, null, { 5 } };
-        final String baseStr = this.toBaseString(array);
-        assertEquals(baseStr + "[{{1,2},<null>,{5}}]", ToStringBuilder.reflectionToString(array));
+        final String baseString = this.toBaseString(array);
+        assertEquals(baseString + "[{{1,2},<null>,{5}}]", ToStringBuilder.reflectionToString(array));
         array = null;
         assertReflectionArray("<null>", array);
     }
@@ -258,8 +258,8 @@ public class ToStringBuilderTest {
     @Test
     public void testReflectionIntArrayArray() {
         int[][] array = new int[][] { { 1, 2 }, null, { 5 } };
-        final String baseStr = this.toBaseString(array);
-        assertEquals(baseStr + "[{{1,2},<null>,{5}}]", ToStringBuilder.reflectionToString(array));
+        final String baseString = this.toBaseString(array);
+        assertEquals(baseString + "[{{1,2},<null>,{5}}]", ToStringBuilder.reflectionToString(array));
         array = null;
         assertReflectionArray("<null>", array);
     }
@@ -267,8 +267,8 @@ public class ToStringBuilderTest {
     @Test
     public void testReflectionhortArrayArray() {
         short[][] array = new short[][] { { 1, 2 }, null, { 5 } };
-        final String baseStr = this.toBaseString(array);
-        assertEquals(baseStr + "[{{1,2},<null>,{5}}]", ToStringBuilder.reflectionToString(array));
+        final String baseString = this.toBaseString(array);
+        assertEquals(baseString + "[{{1,2},<null>,{5}}]", ToStringBuilder.reflectionToString(array));
         array = null;
         assertReflectionArray("<null>", array);
     }
@@ -276,8 +276,8 @@ public class ToStringBuilderTest {
     @Test
     public void testReflectionByteArrayArray() {
         byte[][] array = new byte[][] { { 1, 2 }, null, { 5 } };
-        final String baseStr = this.toBaseString(array);
-        assertEquals(baseStr + "[{{1,2},<null>,{5}}]", ToStringBuilder.reflectionToString(array));
+        final String baseString = this.toBaseString(array);
+        assertEquals(baseString + "[{{1,2},<null>,{5}}]", ToStringBuilder.reflectionToString(array));
         array = null;
         assertReflectionArray("<null>", array);
     }
@@ -285,8 +285,8 @@ public class ToStringBuilderTest {
     @Test
     public void testReflectionCharArrayArray() {
         char[][] array = new char[][] { { 'A', 'B' }, null, { 'p' } };
-        final String baseStr = this.toBaseString(array);
-        assertEquals(baseStr + "[{{A,B},<null>,{p}}]", ToStringBuilder.reflectionToString(array));
+        final String baseString = this.toBaseString(array);
+        assertEquals(baseString + "[{{A,B},<null>,{p}}]", ToStringBuilder.reflectionToString(array));
         array = null;
         assertReflectionArray("<null>", array);
     }
@@ -294,8 +294,8 @@ public class ToStringBuilderTest {
     @Test
     public void testReflectionDoubleArrayArray() {
         double[][] array = new double[][] { { 1.0, 2.29686 }, null, { Double.NaN } };
-        final String baseStr = this.toBaseString(array);
-        assertEquals(baseStr + "[{{1.0,2.29686},<null>,{NaN}}]", ToStringBuilder.reflectionToString(array));
+        final String baseString = this.toBaseString(array);
+        assertEquals(baseString + "[{{1.0,2.29686},<null>,{NaN}}]", ToStringBuilder.reflectionToString(array));
         array = null;
         assertReflectionArray("<null>", array);
     }
@@ -303,9 +303,9 @@ public class ToStringBuilderTest {
     @Test
     public void testReflectionBooleanArrayArray() {
         boolean[][] array = new boolean[][] { { true, false }, null, { false } };
-        final String baseStr = this.toBaseString(array);
-        assertEquals(baseStr + "[{{true,false},<null>,{false}}]", ToStringBuilder.reflectionToString(array));
-        assertEquals(baseStr + "[{{true,false},<null>,{false}}]", ToStringBuilder.reflectionToString(array));
+        final String baseString = this.toBaseString(array);
+        assertEquals(baseString + "[{{true,false},<null>,{false}}]", ToStringBuilder.reflectionToString(array));
+        assertEquals(baseString + "[{{true,false},<null>,{false}}]", ToStringBuilder.reflectionToString(array));
         array = null;
         assertReflectionArray("<null>", array);
     }
@@ -317,15 +317,15 @@ public class ToStringBuilderTest {
         // representation different for IBM JDK 1.6.0, LANG-727
         assumeFalse("IBM Corporation".equals(SystemUtils.JAVA_VENDOR) && "1.6".equals(SystemUtils.JAVA_SPECIFICATION_VERSION));
         assumeFalse("Oracle Corporation".equals(SystemUtils.JAVA_VENDOR) && "1.6".compareTo(SystemUtils.JAVA_SPECIFICATION_VERSION)
< 0);
-        final List<Object> base = new ArrayList<Object>();
-        final String baseStr = this.toBaseString(base);
-        final String expectedWithTransients = baseStr + "[elementData={<null>,<null>,<null>,<null>,<null>,<null>,<null>,<null>,<null>,<null>},size=0,modCount=0]";
-        final String toStringWithTransients = ToStringBuilder.reflectionToString(base, null,
true);
+        final List<Object> list = new ArrayList<Object>();
+        final String baseString = this.toBaseString(list);
+        final String expectedWithTransients = baseString + "[elementData={<null>,<null>,<null>,<null>,<null>,<null>,<null>,<null>,<null>,<null>},size=0,modCount=0]";
+        final String toStringWithTransients = ToStringBuilder.reflectionToString(list, null,
true);
         if (!expectedWithTransients.equals(toStringWithTransients)) {
             assertEquals(expectedWithTransients, toStringWithTransients);
         }
-        final String expectedWithoutTransients = baseStr + "[size=0]";
-        final String toStringWithoutTransients = ToStringBuilder.reflectionToString(base,
null, false);
+        final String expectedWithoutTransients = baseString + "[size=0]";
+        final String toStringWithoutTransients = ToStringBuilder.reflectionToString(list,
null, false);
         if (!expectedWithoutTransients.equals(toStringWithoutTransients)) {
             assertEquals(expectedWithoutTransients, toStringWithoutTransients);
         }
@@ -334,26 +334,26 @@ public class ToStringBuilderTest {
     @Test
     public void testReflectionHierarchy() {
         final ReflectionTestFixtureA baseA = new ReflectionTestFixtureA();
-        String baseStr = this.toBaseString(baseA);
-        assertEquals(baseStr + "[a=a]", ToStringBuilder.reflectionToString(baseA));
-        assertEquals(baseStr + "[a=a]", ToStringBuilder.reflectionToString(baseA, null));
-        assertEquals(baseStr + "[a=a]", ToStringBuilder.reflectionToString(baseA, null, false));
-        assertEquals(baseStr + "[a=a,transientA=t]", ToStringBuilder.reflectionToString(baseA,
null, true));
-        assertEquals(baseStr + "[a=a]", ToStringBuilder.reflectionToString(baseA, null, false,
null));
-        assertEquals(baseStr + "[a=a]", ToStringBuilder.reflectionToString(baseA, null, false,
Object.class));
-        assertEquals(baseStr + "[a=a]", ToStringBuilder.reflectionToString(baseA, null, false,
ReflectionTestFixtureA.class));
+        String baseString = this.toBaseString(baseA);
+        assertEquals(baseString + "[a=a]", ToStringBuilder.reflectionToString(baseA));
+        assertEquals(baseString + "[a=a]", ToStringBuilder.reflectionToString(baseA, null));
+        assertEquals(baseString + "[a=a]", ToStringBuilder.reflectionToString(baseA, null,
false));
+        assertEquals(baseString + "[a=a,transientA=t]", ToStringBuilder.reflectionToString(baseA,
null, true));
+        assertEquals(baseString + "[a=a]", ToStringBuilder.reflectionToString(baseA, null,
false, null));
+        assertEquals(baseString + "[a=a]", ToStringBuilder.reflectionToString(baseA, null,
false, Object.class));
+        assertEquals(baseString + "[a=a]", ToStringBuilder.reflectionToString(baseA, null,
false, ReflectionTestFixtureA.class));
 
         final ReflectionTestFixtureB baseB = new ReflectionTestFixtureB();
-        baseStr = this.toBaseString(baseB);
-        assertEquals(baseStr + "[b=b,a=a]", ToStringBuilder.reflectionToString(baseB));
-        assertEquals(baseStr + "[b=b,a=a]", ToStringBuilder.reflectionToString(baseB));
-        assertEquals(baseStr + "[b=b,a=a]", ToStringBuilder.reflectionToString(baseB, null));
-        assertEquals(baseStr + "[b=b,a=a]", ToStringBuilder.reflectionToString(baseB, null,
false));
-        assertEquals(baseStr + "[b=b,transientB=t,a=a,transientA=t]", ToStringBuilder.reflectionToString(baseB,
null, true));
-        assertEquals(baseStr + "[b=b,a=a]", ToStringBuilder.reflectionToString(baseB, null,
false, null));
-        assertEquals(baseStr + "[b=b,a=a]", ToStringBuilder.reflectionToString(baseB, null,
false, Object.class));
-        assertEquals(baseStr + "[b=b,a=a]", ToStringBuilder.reflectionToString(baseB, null,
false, ReflectionTestFixtureA.class));
-        assertEquals(baseStr + "[b=b]", ToStringBuilder.reflectionToString(baseB, null, false,
ReflectionTestFixtureB.class));
+        baseString = this.toBaseString(baseB);
+        assertEquals(baseString + "[b=b,a=a]", ToStringBuilder.reflectionToString(baseB));
+        assertEquals(baseString + "[b=b,a=a]", ToStringBuilder.reflectionToString(baseB));
+        assertEquals(baseString + "[b=b,a=a]", ToStringBuilder.reflectionToString(baseB,
null));
+        assertEquals(baseString + "[b=b,a=a]", ToStringBuilder.reflectionToString(baseB,
null, false));
+        assertEquals(baseString + "[b=b,transientB=t,a=a,transientA=t]", ToStringBuilder.reflectionToString(baseB,
null, true));
+        assertEquals(baseString + "[b=b,a=a]", ToStringBuilder.reflectionToString(baseB,
null, false, null));
+        assertEquals(baseString + "[b=b,a=a]", ToStringBuilder.reflectionToString(baseB,
null, false, Object.class));
+        assertEquals(baseString + "[b=b,a=a]", ToStringBuilder.reflectionToString(baseB,
null, false, ReflectionTestFixtureA.class));
+        assertEquals(baseString + "[b=b]", ToStringBuilder.reflectionToString(baseB, null,
false, ReflectionTestFixtureB.class));
     }
 
     static class ReflectionTestFixtureA {

Modified: commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/exception/ExceptionUtilsTest.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/exception/ExceptionUtilsTest.java?rev=1533566&r1=1533565&r2=1533566&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/exception/ExceptionUtilsTest.java
(original)
+++ commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/exception/ExceptionUtilsTest.java
Fri Oct 18 17:21:23 2013
@@ -388,8 +388,8 @@ public class ExceptionUtilsTest {
         }
         
         out = new ByteArrayOutputStream(1024);
-        final Throwable withCause = createExceptionWithCause();
-        ExceptionUtils.printRootCauseStackTrace(withCause, new PrintStream(out));
+        final Throwable cause = createExceptionWithCause();
+        ExceptionUtils.printRootCauseStackTrace(cause, new PrintStream(out));
         String stackTrace = out.toString();
         assertTrue(stackTrace.indexOf(ExceptionUtils.WRAPPED_MARKER) != -1);
         
@@ -414,8 +414,8 @@ public class ExceptionUtilsTest {
         }
         
         writer = new StringWriter(1024);
-        final Throwable withCause = createExceptionWithCause();
-        ExceptionUtils.printRootCauseStackTrace(withCause, new PrintWriter(writer));
+        final Throwable cause = createExceptionWithCause();
+        ExceptionUtils.printRootCauseStackTrace(cause, new PrintWriter(writer));
         String stackTrace = writer.toString();
         assertTrue(stackTrace.indexOf(ExceptionUtils.WRAPPED_MARKER) != -1);
         
@@ -430,8 +430,8 @@ public class ExceptionUtilsTest {
     public void testGetRootCauseStackTrace_Throwable() throws Exception {
         assertEquals(0, ExceptionUtils.getRootCauseStackTrace(null).length);
         
-        final Throwable withCause = createExceptionWithCause();
-        String[] stackTrace = ExceptionUtils.getRootCauseStackTrace(withCause);
+        final Throwable cause = createExceptionWithCause();
+        String[] stackTrace = ExceptionUtils.getRootCauseStackTrace(cause);
         boolean match = false;
         for (final String element : stackTrace) {
             if (element.startsWith(ExceptionUtils.WRAPPED_MARKER)) {

Modified: commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/text/ExtendedMessageFormatTest.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/text/ExtendedMessageFormatTest.java?rev=1533566&r1=1533565&r2=1533566&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/text/ExtendedMessageFormatTest.java
(original)
+++ commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/text/ExtendedMessageFormatTest.java
Fri Oct 18 17:21:23 2013
@@ -228,21 +228,21 @@ public class ExtendedMessageFormatTest {
         cal.set(2007, Calendar.JANUARY, 23);
         final Object[] args = new Object[] {cal.getTime()};
         final Locale[] availableLocales = DateFormat.getAvailableLocales();
-        final Map<String, ? extends FormatFactory> registry = Collections.singletonMap("date",
new OverrideShortDateFormatFactory());
+        final Map<String, ? extends FormatFactory> dateRegistry = Collections.singletonMap("date",
new OverrideShortDateFormatFactory());
 
         //check the non-overridden builtins:
-        checkBuiltInFormat("1: {0,date}", registry,          args, availableLocales);
-        checkBuiltInFormat("2: {0,date,medium}", registry,   args, availableLocales);
-        checkBuiltInFormat("3: {0,date,long}", registry,     args, availableLocales);
-        checkBuiltInFormat("4: {0,date,full}", registry,     args, availableLocales);
-        checkBuiltInFormat("5: {0,date,d MMM yy}", registry, args, availableLocales);
+        checkBuiltInFormat("1: {0,date}", dateRegistry,          args, availableLocales);
+        checkBuiltInFormat("2: {0,date,medium}", dateRegistry,   args, availableLocales);
+        checkBuiltInFormat("3: {0,date,long}", dateRegistry,     args, availableLocales);
+        checkBuiltInFormat("4: {0,date,full}", dateRegistry,     args, availableLocales);
+        checkBuiltInFormat("5: {0,date,d MMM yy}", dateRegistry, args, availableLocales);
 
         //check the overridden format:
         for (int i = -1; i < availableLocales.length; i++) {
             final Locale locale = i < 0 ? null : availableLocales[i];
             final MessageFormat dateDefault = createMessageFormat("{0,date}", locale);
             final String pattern = "{0,date,short}";
-            final ExtendedMessageFormat dateShort = new ExtendedMessageFormat(pattern, locale,
registry);
+            final ExtendedMessageFormat dateShort = new ExtendedMessageFormat(pattern, locale,
dateRegistry);
             assertEquals("overridden date,short format", dateDefault.format(args), dateShort.format(args));
             assertEquals("overridden date,short pattern", pattern, dateShort.toPattern());
         }
@@ -267,11 +267,11 @@ public class ExtendedMessageFormatTest {
      */
     @Test
     public void testEqualsHashcode() {
-        final Map<String, ? extends FormatFactory> registry = Collections.singletonMap("testfmt",
new LowerCaseFormatFactory());
+        final Map<String, ? extends FormatFactory> fmtRegistry = Collections.singletonMap("testfmt",
new LowerCaseFormatFactory());
         final Map<String, ? extends FormatFactory> otherRegitry = Collections.singletonMap("testfmt",
new UpperCaseFormatFactory());
 
         final String pattern = "Pattern: {0,testfmt}";
-        final ExtendedMessageFormat emf = new ExtendedMessageFormat(pattern, Locale.US, registry);
+        final ExtendedMessageFormat emf = new ExtendedMessageFormat(pattern, Locale.US, fmtRegistry);
 
         ExtendedMessageFormat other = null;
 
@@ -280,17 +280,17 @@ public class ExtendedMessageFormatTest {
         assertTrue("same, hashcode()", emf.hashCode() == emf.hashCode());
 
         // Equal Object
-        other = new ExtendedMessageFormat(pattern, Locale.US, registry);
+        other = new ExtendedMessageFormat(pattern, Locale.US, fmtRegistry);
         assertTrue("equal, equals()",   emf.equals(other));
         assertTrue("equal, hashcode()", emf.hashCode() == other.hashCode());
 
         // Different Class
-        other = new OtherExtendedMessageFormat(pattern, Locale.US, registry);
+        other = new OtherExtendedMessageFormat(pattern, Locale.US, fmtRegistry);
         assertFalse("class, equals()",  emf.equals(other));
         assertTrue("class, hashcode()", emf.hashCode() == other.hashCode()); // same hashcode
         
         // Different pattern
-        other = new ExtendedMessageFormat("X" + pattern, Locale.US, registry);
+        other = new ExtendedMessageFormat("X" + pattern, Locale.US, fmtRegistry);
         assertFalse("pattern, equals()",   emf.equals(other));
         assertFalse("pattern, hashcode()", emf.hashCode() == other.hashCode());
 
@@ -300,7 +300,7 @@ public class ExtendedMessageFormatTest {
         assertFalse("registry, hashcode()", emf.hashCode() == other.hashCode());
 
         // Different Locale
-        other = new ExtendedMessageFormat(pattern, Locale.FRANCE, registry);
+        other = new ExtendedMessageFormat(pattern, Locale.FRANCE, fmtRegistry);
         assertFalse("locale, equals()",  emf.equals(other));
         assertTrue("locale, hashcode()", emf.hashCode() == other.hashCode()); // same hashcode
     }
@@ -318,14 +318,14 @@ public class ExtendedMessageFormatTest {
     /**
      * Test a built in format for the specified Locales, plus <code>null</code>
Locale.
      * @param pattern MessageFormat pattern
-     * @param registry FormatFactory registry to use
+     * @param fmtRegistry FormatFactory registry to use
      * @param args MessageFormat arguments
      * @param locales to test
      */
-    private void checkBuiltInFormat(final String pattern, final Map<String, ?> registry,
final Object[] args, final Locale[] locales) {
-        checkBuiltInFormat(pattern, registry, args, (Locale) null);
+    private void checkBuiltInFormat(final String pattern, final Map<String, ?> fmtRegistry,
final Object[] args, final Locale[] locales) {
+        checkBuiltInFormat(pattern, fmtRegistry, args, (Locale) null);
         for (final Locale locale : locales) {
-            checkBuiltInFormat(pattern, registry, args, locale);
+            checkBuiltInFormat(pattern, fmtRegistry, args, locale);
         }
     }
 
@@ -333,11 +333,11 @@ public class ExtendedMessageFormatTest {
      * Create an ExtendedMessageFormat for the specified pattern and locale and check the
      * formated output matches the expected result for the parameters.
      * @param pattern string
-     * @param registry map
+     * @param registryUnused map (currently unused)
      * @param args Object[]
      * @param locale Locale
      */
-    private void checkBuiltInFormat(final String pattern, final Map<String, ?> registry,
final Object[] args, final Locale locale) {
+    private void checkBuiltInFormat(final String pattern, final Map<String, ?> registryUnused,
final Object[] args, final Locale locale) {
         final StringBuilder buffer = new StringBuilder();
         buffer.append("Pattern=[");
         buffer.append(pattern);



Mime
View raw message