[gatein-commits] gatein SVN: r5164 - exo/portal/branches/3.1.x/component/resources/src/main/java/org/exoplatform/services/resources/impl.

do-not-reply at jboss.org do-not-reply at jboss.org
Thu Nov 18 21:15:56 EST 2010


Author: ndkhoiits
Date: 2010-11-18 21:15:56 -0500 (Thu, 18 Nov 2010)
New Revision: 5164

Modified:
   exo/portal/branches/3.1.x/component/resources/src/main/java/org/exoplatform/services/resources/impl/BaseResourceBundleService.java
Log:
EXOGTN-131 Revert all commitment

Modified: exo/portal/branches/3.1.x/component/resources/src/main/java/org/exoplatform/services/resources/impl/BaseResourceBundleService.java
===================================================================
--- exo/portal/branches/3.1.x/component/resources/src/main/java/org/exoplatform/services/resources/impl/BaseResourceBundleService.java	2010-11-18 18:32:30 UTC (rev 5163)
+++ exo/portal/branches/3.1.x/component/resources/src/main/java/org/exoplatform/services/resources/impl/BaseResourceBundleService.java	2010-11-19 02:15:56 UTC (rev 5164)
@@ -22,7 +22,6 @@
 import org.exoplatform.commons.utils.IOUtil;
 import org.exoplatform.commons.utils.MapResourceBundle;
 import org.exoplatform.commons.utils.PageList;
-import org.exoplatform.commons.utils.PropertyManager;
 import org.exoplatform.container.xml.InitParams;
 import org.exoplatform.services.cache.ExoCache;
 import org.exoplatform.services.log.Log;
@@ -384,6 +383,11 @@
          return IdentityResourceBundle.getInstance();
       }
 
+      // Case 1: ResourceBundle of portlets, standard java API is used
+      if (isClasspathResource(name))
+         return ResourceBundleLoader.load(name, locale, cl);
+
+      // Case 2: ResourceBundle of portal
       String country = locale.getCountry();
       String id;
       if (country != null && country.length() > 0)
@@ -395,15 +399,6 @@
          id = name + "_" + locale.getLanguage();
       }
 
-      boolean isClasspathResource = isClasspathResource(name);
-      boolean isCacheable = !isClasspathResource || !PropertyManager.isDevelopping();
-      
-      if(isClasspathResource)
-      {
-    	  //Avoid naming collision
-    	  id += "_" + cl.toString();
-      }
-      
       try
       {
          ResourceBundle rb = cache_.get(id);
@@ -416,17 +411,6 @@
       {
       }
 
-      // Case 1: ResourceBundle of portlets, standard java API is used
-      if (isClasspathResource)
-      {
-         ResourceBundle res = ResourceBundleLoader.load(name, locale, cl);
-         //Cache classpath resource bundle while running portal in non-dev mode
-         if(isCacheable)
-        	 cache_.put(id, res);
-         return res;
-      }
-
-      // Case 2: ResourceBundle of portal
       try
       {
          ResourceBundle res = null;



More information about the gatein-commits mailing list