Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ public class TagScript implements Script {
/** The Log to which logging calls will be made. */
private static final Log log = LogFactory.getLog(TagScript.class);

/** Used to serialize access to {@link org.apache.commons.beanutils.WrapDynaClass#CLASSLOADER_CACHE}, which is not thread-safe */
private static final Object lock = new Object();

/** The attribute expressions that are created */
protected Map<String,ExpressionAttribute> attributes = new HashMap<String,ExpressionAttribute>();
Expand Down Expand Up @@ -239,7 +241,11 @@ public void run(JellyContext context, XMLOutput output) throws JellyTagException
}
else {
// treat the tag as a bean
DynaBean dynaBean = new ConvertingWrapDynaBean( tag );
DynaBean dynaBean;
// Work around BEANUTILS-509
synchronized (lock) {
dynaBean = new ConvertingWrapDynaBean(tag);
}
for (Iterator iter = attributes.entrySet().iterator(); iter.hasNext();) {
Map.Entry entry = (Map.Entry) iter.next();
String name = (String) entry.getKey();
Expand Down