geirm       00/12/03 18:08:49

  Modified:    src/java/org/apache/velocity/runtime/directive
                        VelocimacroProxy.java
  Log:
  Context-safety support.  Moved everything volaitile out of class vars / init() to 
render().
  
  Revision  Changes    Path
  1.11      +3 -6      
jakarta-velocity/src/java/org/apache/velocity/runtime/directive/VelocimacroProxy.java
  
  Index: VelocimacroProxy.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-velocity/src/java/org/apache/velocity/runtime/directive/VelocimacroProxy.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- VelocimacroProxy.java     2000/12/02 03:31:32     1.10
  +++ VelocimacroProxy.java     2000/12/04 02:08:48     1.11
  @@ -58,7 +58,7 @@
    *   a proxy Directive-derived object to fit with the current directive system
    *
    * @author <a href="mailto:[EMAIL PROTECTED]">Geir Magnusson Jr.</a>
  - * @version $Id: VelocimacroProxy.java,v 1.10 2000/12/02 03:31:32 geirm Exp $ 
  + * @version $Id: VelocimacroProxy.java,v 1.11 2000/12/04 02:08:48 geirm Exp $ 
    */
   
   package org.apache.velocity.runtime.directive;
  @@ -192,11 +192,8 @@
   
                   if (!bInit_)
                   {
  -                    Context ctxt = (Context) context.clone();
  -
  -                    nodeTree_.init( ctxt, null );
  +                    nodeTree_.init( null,null);
                       bInit_ = true;
  -                    ctxt = null;
                   }
   
                   nodeTree_.render(context, writer );
  @@ -216,7 +213,7 @@
       /**
        *   The major meat of VelocimacroProxy, init() checks the # of arguments, 
patches the
        *   macro body, renders the macro into an AST, and then inits the AST, so it 
is ready 
  -     *   for quick rendering.
  +     *   for quick rendering.  Note that this is only AST dependant stuff. Not 
context.
        */
       public void init(Context context, Node node) 
          throws Exception
  
  
  

Reply via email to