geirm       00/12/03 18:09:50

  Modified:    src/java/org/apache/velocity/runtime Runtime.java
  Log:
  Added init of Templates immediately after parse().  AST init() is no longer 
dependant upon context data as all introspection and other context issues have been 
moved to render() / other runtime calls.
  
  Revision  Changes    Path
  1.64      +6 -1      
jakarta-velocity/src/java/org/apache/velocity/runtime/Runtime.java
  
  Index: Runtime.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-velocity/src/java/org/apache/velocity/runtime/Runtime.java,v
  retrieving revision 1.63
  retrieving revision 1.64
  diff -u -r1.63 -r1.64
  --- Runtime.java      2000/11/28 04:17:08     1.63
  +++ Runtime.java      2000/12/04 02:09:49     1.64
  @@ -154,7 +154,7 @@
    * @author <a href="mailto:[EMAIL PROTECTED]">Jason van Zyl</a>
    * @author <a href="mailto:[EMAIL PROTECTED]">Jeff Bowden</a>
    * @author <a href="mailto:[EMAIL PROTECTED]">Geir Magusson Jr.</a>
  - * @version $Id: Runtime.java,v 1.63 2000/11/28 04:17:08 jvanzyl Exp $
  + * @version $Id: Runtime.java,v 1.64 2000/12/04 02:09:49 geirm Exp $
    */
   public class Runtime implements RuntimeConstants
   {
  @@ -905,6 +905,8 @@
                   {
                       is = tl.getTemplateStream(template);
                       t.setDocument(parse(is));
  +                    t.initDocument();
  +
                       return t;
                   }
                   catch (Exception e)
  @@ -952,6 +954,9 @@
                   t.setModificationCheckInterval(tl.getModificationCheckInterval());
                   t.setTemplateLoader(tl);
                   t.setDocument(parse(is));
  +
  +                t.initDocument();
  +
                   t.touch();
                   
                   /*
  
  
  

Reply via email to