luehe       2002/12/03 15:49:46

  Modified:    jasper2/src/share/org/apache/jasper/compiler Generator.java
  Log:
  Do not call the setParent() method on SimpleTag handlers if the value
  being passed is null, since SimpleTag instances are not reused
  
  Revision  Changes    Path
  1.135     +11 -7     
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Generator.java
  
  Index: Generator.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Generator.java,v
  retrieving revision 1.134
  retrieving revision 1.135
  diff -u -r1.134 -r1.135
  --- Generator.java    3 Dec 2002 23:17:48 -0000       1.134
  +++ Generator.java    3 Dec 2002 23:49:46 -0000       1.135
  @@ -2378,10 +2378,14 @@
                    out.println(");");
                }
            } else {
  -             out.printin(tagHandlerVar);
  -             out.print(".setParent(");
  -             out.print(parent);
  -             out.println(");");
  +             // The setParent() method need not be called if the value being
  +             // passed is null, since SimpleTag instances are not reused
  +             if (parent != null) {
  +                 out.printin(tagHandlerVar);
  +                 out.print(".setParent(");
  +                 out.print(parent);
  +                 out.println(");");
  +             }
            }
   
            Node.JspAttribute[] attrs = n.getJspAttributes();
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to