Author: adrianc
Date: Mon Jul 7 08:18:35 2008
New Revision: 674523
URL:
http://svn.apache.org/viewvc?rev=674523&view=revLog:
Small fixup for last commit - faster, safer code.
Modified:
ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/collections/ResourceBundleMapWrapper.java
Modified: ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/collections/ResourceBundleMapWrapper.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/collections/ResourceBundleMapWrapper.java?rev=674523&r1=674522&r2=674523&view=diff==============================================================================
--- ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/collections/ResourceBundleMapWrapper.java (original)
+++ ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/collections/ResourceBundleMapWrapper.java Mon Jul 7 08:18:35 2008
@@ -118,10 +118,12 @@
Object value = this.rbmwStack.get(arg0);
if (value == null) {
value = arg0;
- } else {
- String str = (String) value;
- if (str.contains("${") && context != null) {
+ } else if (context != null){
+ try {
+ String str = (String) value;
return FlexibleStringExpander.expandString(str, context);
+ } catch (Exception e) {
+ // Potential ClassCastException - do nothing
}
}
return value;