[gatein-commits] gatein SVN: r5155 - 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 05:48:11 EST 2010
Author: hoang_to
Date: 2010-11-18 05:48:11 -0500 (Thu, 18 Nov 2010)
New Revision: 5155
Modified:
exo/portal/branches/3.1.x/component/resources/src/main/java/org/exoplatform/services/resources/impl/BaseResourceBundleService.java
Log:
EXOGTN-131: Apply updated patch
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 10:45:34 UTC (rev 5154)
+++ exo/portal/branches/3.1.x/component/resources/src/main/java/org/exoplatform/services/resources/impl/BaseResourceBundleService.java 2010-11-18 10:48:11 UTC (rev 5155)
@@ -395,6 +395,15 @@
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);
@@ -408,11 +417,11 @@
}
// Case 1: ResourceBundle of portlets, standard java API is used
- if (isClasspathResource(name))
+ if (isClasspathResource)
{
ResourceBundle res = ResourceBundleLoader.load(name, locale, cl);
//Cache classpath resource bundle while running portal in non-dev mode
- if(!PropertyManager.isDevelopping())
+ if(isCacheable)
cache_.put(id, res);
return res;
}
More information about the gatein-commits
mailing list