Author: adrianc
Date: Thu Aug 21 16:34:59 2008
New Revision: 687900
URL:
http://svn.apache.org/viewvc?rev=687900&view=revLog:
Added some synchronization code to FlexibleStringExpander.
Modified:
ofbiz/trunk/framework/base/src/org/ofbiz/base/util/string/FlexibleStringExpander.java
Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/string/FlexibleStringExpander.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/string/FlexibleStringExpander.java?rev=687900&r1=687899&r2=687900&view=diff==============================================================================
--- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/string/FlexibleStringExpander.java (original)
+++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/string/FlexibleStringExpander.java Thu Aug 21 16:34:59 2008
@@ -142,7 +142,9 @@
elem.append(buffer, context, timeZone, locale);
}
if (buffer.length() > this.hint) {
- this.hint = buffer.length();
+ synchronized(this) {
+ this.hint = buffer.length();
+ }
}
return buffer.toString();
}
@@ -374,7 +376,9 @@
elem.append(expr, context, timeZone, locale);
}
if (expr.length() > this.hint) {
- this.hint = expr.length();
+ synchronized(this) {
+ this.hint = expr.length();
+ }
}
FlexibleMapAccessor<Object> fma = new FlexibleMapAccessor<Object>(expr.toString());
Object obj = fma.get(context, locale);