You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by do...@apache.org on 2010/12/10 08:20:43 UTC

svn commit: r1044229 - /ofbiz/trunk/framework/base/src/org/ofbiz/base/util/template/FreeMarkerWorker.java

Author: doogie
Date: Fri Dec 10 07:20:42 2010
New Revision: 1044229

URL: http://svn.apache.org/viewvc?rev=1044229&view=rev
Log:
Remove unnecessary cast when fetching the compiled template from the
UtilCache cache.

Modified:
    ofbiz/trunk/framework/base/src/org/ofbiz/base/util/template/FreeMarkerWorker.java

Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/template/FreeMarkerWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/template/FreeMarkerWorker.java?rev=1044229&r1=1044228&r2=1044229&view=diff
==============================================================================
--- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/template/FreeMarkerWorker.java (original)
+++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/template/FreeMarkerWorker.java Fri Dec 10 07:20:42 2010
@@ -324,10 +324,10 @@ public class FreeMarkerWorker {
     }
 
     public static Template getTemplate(String templateLocation, UtilCache<String, Template> cache, Configuration config) throws TemplateException, IOException {
-        Template template = (Template) cache.get(templateLocation);
+        Template template = cache.get(templateLocation);
         if (template == null) {
             synchronized (cache) {
-                template = (Template) cache.get(templateLocation);
+                template = cache.get(templateLocation);
                 if (template == null) {
                     // only make the reader if we need it, and then close it right after!
                     Reader templateReader = makeReader(templateLocation);