You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openjpa.apache.org by mp...@apache.org on 2006/08/25 23:35:13 UTC

svn commit: r436962 - /incubator/openjpa/trunk/openjpa-lib/src/test/java/org/apache/openjpa/lib/util/TestLocalizer.java

Author: mprudhom
Date: Fri Aug 25 14:35:13 2006
New Revision: 436962

URL: http://svn.apache.org/viewvc?rev=436962&view=rev
Log:
Fixed to use equals() instead of == for testing the type of the current Locale.

Modified:
    incubator/openjpa/trunk/openjpa-lib/src/test/java/org/apache/openjpa/lib/util/TestLocalizer.java

Modified: incubator/openjpa/trunk/openjpa-lib/src/test/java/org/apache/openjpa/lib/util/TestLocalizer.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-lib/src/test/java/org/apache/openjpa/lib/util/TestLocalizer.java?rev=436962&r1=436961&r2=436962&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-lib/src/test/java/org/apache/openjpa/lib/util/TestLocalizer.java (original)
+++ incubator/openjpa/trunk/openjpa-lib/src/test/java/org/apache/openjpa/lib/util/TestLocalizer.java Fri Aug 25 14:35:13 2006
@@ -44,7 +44,7 @@
      * Test getting a string for a class.
      */
     public void testForClass() {
-        assertEquals(Locale.getDefault() == Locale.GERMANY
+        assertEquals(Locale.getDefault().equals(Locale.GERMANY)
             ? "value1_de" : "value1", _locals.get("test.local1"));
     }
 
@@ -63,7 +63,7 @@
     public void testFallbackLocale() {
         Localizer locl = Localizer.forPackage(LocalizerTestHelper.class,
             Locale.FRANCE);
-        assertEquals(Locale.getDefault() == Locale.GERMANY
+        assertEquals(Locale.getDefault().equals(Locale.GERMANY)
             ? "value1_de" : "value1", locl.get("test.local1"));
     }
 
@@ -80,7 +80,7 @@
      * Test that the message formatting works correctly.
      */
     public void testMessageFormat() {
-        String suffix = Locale.getDefault() == Locale.GERMANY ? "_de" : "";
+        String suffix = Locale.getDefault().equals(Locale.GERMANY) ? "_de" : "";
 
         assertEquals("value2" + suffix + " x sep y", _locals.get("test.local2",
             new String[]{ "x", "y" }));