You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by nb...@apache.org on 2004/06/09 03:30:58 UTC

cvs commit: jakarta-velocity-tools/src/java/org/apache/velocity/tools/generic RenderTool.java

nbubna      2004/06/08 18:30:58

  Modified:    src/java/org/apache/velocity/tools/generic RenderTool.java
  Log:
  make recurse() handle evaluation failures gracefully instead of throwing an NPE
  
  Revision  Changes    Path
  1.7       +2 -2      jakarta-velocity-tools/src/java/org/apache/velocity/tools/generic/RenderTool.java
  
  Index: RenderTool.java
  ===================================================================
  RCS file: /home/cvs/jakarta-velocity-tools/src/java/org/apache/velocity/tools/generic/RenderTool.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- RenderTool.java	18 Feb 2004 20:11:07 -0000	1.6
  +++ RenderTool.java	9 Jun 2004 01:30:58 -0000	1.7
  @@ -121,7 +121,7 @@
       public String recurse(Context ctx, String vtl) throws Exception
       {
           String result = eval(ctx, vtl);
  -        if (result.equals(vtl))
  +        if (result == null || result.equals(vtl))
           {
               return result;
           }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-dev-help@jakarta.apache.org