click-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sa...@apache.org
Subject svn commit: r958186 - /click/trunk/click/framework/src/org/apache/click/util/MessagesMap.java
Date Sat, 26 Jun 2010 06:09:21 GMT
Author: sabob
Date: Sat Jun 26 06:09:20 2010
New Revision: 958186

URL: http://svn.apache.org/viewvc?rev=958186&view=rev
Log:
fixed private type being exposed through public API

Modified:
    click/trunk/click/framework/src/org/apache/click/util/MessagesMap.java

Modified: click/trunk/click/framework/src/org/apache/click/util/MessagesMap.java
URL: http://svn.apache.org/viewvc/click/trunk/click/framework/src/org/apache/click/util/MessagesMap.java?rev=958186&r1=958185&r2=958186&view=diff
==============================================================================
--- click/trunk/click/framework/src/org/apache/click/util/MessagesMap.java (original)
+++ click/trunk/click/framework/src/org/apache/click/util/MessagesMap.java Sat Jun 26 06:09:20
2010
@@ -73,8 +73,8 @@ public class MessagesMap implements Map<
         Collections.synchronizedSet(new HashSet<String>());
 
     /** Cache of messages keyed by bundleName + Locale name. */
-    protected static final Map<CacheKey, Map<String, String>> MESSAGES_CACHE
= 
-        new HashMap<CacheKey, Map<String, String>>();
+    protected static final Map<Object, Map<String, String>> MESSAGES_CACHE =
+        new HashMap<Object, Map<String, String>>();
 
     /** The cache key set load lock. */
     protected static final Object CACHE_LOAD_LOCK = new Object();
@@ -139,7 +139,7 @@ public class MessagesMap implements Map<
     public boolean containsKey(Object key) {
         if (key != null) {
             ensureInitialized();
-            return messages.containsKey(key);
+            return messages.containsKey(key.toString());
         }
         return false;
     }
@@ -150,7 +150,6 @@ public class MessagesMap implements Map<
     public boolean containsValue(Object value) {
         ensureInitialized();
         return messages.containsValue(value);
-
     }
 
     /**
@@ -164,13 +163,11 @@ public class MessagesMap implements Map<
         String value = null;
         if (key != null) {
             ensureInitialized();
-            value = messages.get(key);
+            value = messages.get(key.toString());
         }
 
         if (value == null) {
-            String msg =
-                "Message \"{0}\" not found in bundle \"{1}\" "
-                + "for locale \"{2}\"";
+            String msg = "Message \"{0}\" not found in bundle \"{1}\" for locale \"{2}\"";
             String keyStr = (key != null) ? key.toString() : null;
             Object[] args = { keyStr, baseClass.getName(), locale };
             msg = MessageFormat.format(msg, args);



Mime
View raw message