jvanzyl 00/10/09 11:52:50
Modified: src/java/org/apache/velocity/runtime/loader
FileTemplateLoader.java
Log:
- moved synchronization into the loader and out of the runtime.
Revision Changes Path
1.3 +3 -5
jakarta-velocity/src/java/org/apache/velocity/runtime/loader/FileTemplateLoader.java
Index: FileTemplateLoader.java
===================================================================
RCS file:
/home/cvs/jakarta-velocity/src/java/org/apache/velocity/runtime/loader/FileTemplateLoader.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- FileTemplateLoader.java 2000/09/30 22:35:11 1.2
+++ FileTemplateLoader.java 2000/10/09 18:52:50 1.3
@@ -69,7 +69,7 @@
* That'll change once we decide how we want to do configuration
*
* @author Dave Bryson
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*/
public class FileTemplateLoader extends TemplateLoader
{
@@ -104,7 +104,7 @@
* Fetch the template
* @return Template
*/
- public Template getTemplate( String name )
+ public synchronized Template getTemplate( String name )
throws Exception
{
if ( useCache )
@@ -136,8 +136,7 @@
if ( file.canRead() )
{
Template template = new Template(
- new FileInputStream(file.getAbsolutePath()));//,
- //processor );
+ new FileInputStream(file.getAbsolutePath()));
if ( useCache )
{
@@ -154,7 +153,6 @@
else
{
throw new Exception("Can't load template: " + file.getAbsolutePath());
- //return null;
}
}
}