Permalink
Browse files

Minor change after threadsafe fix to ensure message bundles flush.

  • Loading branch information...
1 parent d20ffc3 commit 4046d846a139b9fdaaf57df0e0f9f9a63ab17b20 @codedance committed May 14, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/main/java/com/papercut/silken/NamespaceSet.java
@@ -136,7 +136,7 @@ protected void flush() {
}
protected String render(String templateName, SoyMapData model, SoyMapData ijData, Locale locale) {
- SoyMsgBundle msgBundle = locale != null ? msgBundleCache.get(locale) : null;
+
Renderer renderer;
synchronized (cacheLock) {
@@ -150,6 +150,7 @@ protected String render(String templateName, SoyMapData model, SoyMapData ijData
renderer = tofu.newRenderer(templateName);
}
+ final SoyMsgBundle msgBundle = locale != null ? msgBundleCache.get(locale) : null;
return renderer.setData(model)
.setMsgBundle(msgBundle)
.setIjData(ijData)

0 comments on commit 4046d84

Please sign in to comment.