From f37d9f8d615cae73b620186f930a49dd0e402be2 Mon Sep 17 00:00:00 2001 From: Marc Prud'hommeaux Date: Fri, 25 Aug 2006 21:35:13 +0000 Subject: [PATCH] Fixed to use equals() instead of == for testing the type of the current Locale. git-svn-id: https://svn.apache.org/repos/asf/incubator/openjpa/trunk@436962 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/openjpa/lib/util/TestLocalizer.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/openjpa-lib/src/test/java/org/apache/openjpa/lib/util/TestLocalizer.java b/openjpa-lib/src/test/java/org/apache/openjpa/lib/util/TestLocalizer.java index 418a2d188..ce9653873 100644 --- a/openjpa-lib/src/test/java/org/apache/openjpa/lib/util/TestLocalizer.java +++ b/openjpa-lib/src/test/java/org/apache/openjpa/lib/util/TestLocalizer.java @@ -44,7 +44,7 @@ public class TestLocalizer extends TestCase { * 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 class TestLocalizer extends TestCase { 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 @@ public class TestLocalizer extends TestCase { * 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" }));