jvanzyl     00/09/30 15:34:50

  Modified:    src/java/org/apache/velocity/runtime/loader
                        TemplateFactory.java
  Log:
  - don't init() the template loader when instantiating, because
    the template.path might need to be set by an external mechanism.
  
  Revision  Changes    Path
  1.2       +2 -4      
jakarta-velocity/src/java/org/apache/velocity/runtime/loader/TemplateFactory.java
  
  Index: TemplateFactory.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-velocity/src/java/org/apache/velocity/runtime/loader/TemplateFactory.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TemplateFactory.java      2000/09/30 17:04:29     1.1
  +++ TemplateFactory.java      2000/09/30 22:34:49     1.2
  @@ -61,7 +61,7 @@
    * Factory to grab a template loader.
    * 
    * @author Dave Bryson
  - * $Revision: 1.1 $
  + * $Revision: 1.2 $
    */
   public class TemplateFactory
   {
  @@ -77,15 +77,13 @@
           try
           {
               loader = ((TemplateLoader)Class.forName(loaderClassName).newInstance());
  -            loader.init();
  +            Runtime.info("Template loader instantiated.");
               
  -            Runtime.info("Template loader initialized.");
  -            
               return loader;
           }
           catch( Exception e)
           {
  -            Runtime.error("Problem initializing the template loader.\n" +
  +            Runtime.error("Problem instantiating the template loader.\n" +
                             "Look at your properties file and make sure the\n" +
                             "name of the template loader is correct. Here is the\n" +
                             "error: " + e);
  
  
  

Reply via email to