Update of /var/cvs/src/org/mmbase/util
In directory james.mmbase.org:/tmp/cvs-serv7590

Modified Files:
        SortedBundle.java 
Log Message:
made 'knownResources' final


See also: http://cvs.mmbase.org/viewcvs/src/org/mmbase/util


Index: SortedBundle.java
===================================================================
RCS file: /var/cvs/src/org/mmbase/util/SortedBundle.java,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -b -r1.31 -r1.32
--- SortedBundle.java   3 Feb 2008 17:33:57 -0000       1.31
+++ SortedBundle.java   18 Jul 2008 05:48:36 -0000      1.32
@@ -29,7 +29,7 @@
  *
  * @author Michiel Meeuwissen
  * @since  MMBase-1.8
- * @version $Id: SortedBundle.java,v 1.31 2008/02/03 17:33:57 nklasens Exp $
+ * @version $Id: SortedBundle.java,v 1.32 2008/07/18 05:48:36 michiel Exp $
  */
 public class SortedBundle {
 
@@ -49,7 +49,7 @@
     public static final HashMap<String,Object> NO_CONSTANTSPROVIDER = null;
 
     // cache of maps.
-    private static Cache<String,SortedMap<Object,Object>> knownResources = new 
Cache<String,SortedMap<Object,Object>>(100) {
+    private static final Cache<String,SortedMap<Object,Object>> knownResources 
= new Cache<String,SortedMap<Object,Object>>(100) {
             public String getName() {
                 return "ConstantBundles";
             }
@@ -59,7 +59,7 @@
         };
 
     static {
-        knownResources.putCache();
+        org.mmbase.cache.CacheManager.putCache(knownResources, false);
     }
 
     /**
@@ -176,12 +176,13 @@
      * the combination of the arguments. See [EMAIL PROTECTED] #getResource}.
      */
     protected static Object castKey(final String bundleKey, final Object 
value, final Map<String,Object> constantsProvider, final Class<?> wrapper, 
final Locale locale) {
+
         if (bundleKey == null) return null;
         Object key;
         // if the key is numeric then it will be sorted by number
         //key Double
 
-        Map<String,Object> provider = constantsProvider; // default class (may 
be null)
+        Map<String, Object> provider = constantsProvider; // default class 
(may be null)
         int lastDot = bundleKey.lastIndexOf('.');
         if (lastDot > 0) {
             Class<?> providerClass;
@@ -206,7 +207,6 @@
         if (wrapper != null && ! wrapper.isAssignableFrom(key.getClass())) {
             try {
                 if (ValueWrapper.class.isAssignableFrom(wrapper)) {
-                    log.debug("wrapper is a valueWrapper");
                     if (locale == null) {
                         Constructor<?> c = 
wrapper.getConstructor(Object.class, Comparable.class );
                         key = c.newInstance(key, value);
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs

Reply via email to