Christoph Reck <[EMAIL PROTECTED]> writes:

> --- Apache-Velocity-20010109/src/java/org/apache/velocity/runtime/Runtime.java  Tue 
>Jan  2 03:42:29 2001
> +++ Apache-Velocity/src/java/org/apache/velocity/runtime/Runtime.java   Fri Jan 12 
>18:17:10 2001
> @@ -560,10 +560,16 @@
>          
>          if (parser != null)
>          {
> +            try
> +            {
>                  AST = parser.parse(inputStream, strTemplateName);
> -                parserPool.put(parser);
>                  return AST;
>              }
> +            finally
> +            {
> +                parserPool.put(parser);
> +            }
> +        }
>          else
>          {
>              error("Runtime : ran out of parsers!");

The return should happen *after* the finally block.  Even though it may
work as written, it is *much* more clear without the return inside the
try block.  Once that is corrected, +1.
-- 

Daniel Rall <[EMAIL PROTECTED]>

Reply via email to