dlr         01/04/27 15:12:42

  Modified:    src/java/org/apache/velocity/app Velocity.java
  Log:
  Small optimization to templateExists() instance method.
  
  Revision  Changes    Path
  1.16      +2 -17     jakarta-velocity/src/java/org/apache/velocity/app/Velocity.java
  
  Index: Velocity.java
  ===================================================================
  RCS file: /home/cvs/jakarta-velocity/src/java/org/apache/velocity/app/Velocity.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- Velocity.java     2001/04/27 15:21:08     1.15
  +++ Velocity.java     2001/04/27 22:12:40     1.16
  @@ -107,7 +107,7 @@
    * @author <a href="mailto:[EMAIL PROTECTED]";>Geir Magnusson Jr.</a>
    * @author <a href="[EMAIL PROTECTED]">Christoph Reck</a>
    * @author <a href="[EMAIL PROTECTED]">Jason van Zyl</a>
  - * @version $Id: Velocity.java,v 1.15 2001/04/27 15:21:08 geirm Exp $
  + * @version $Id: Velocity.java,v 1.16 2001/04/27 22:12:40 dlr Exp $
    */
   
   public class Velocity implements RuntimeConstants
  @@ -560,21 +560,6 @@
        */
       public static boolean templateExists( String templateName )
       {
  -        String loader = Runtime.getLoaderNameForResource( templateName );
  -       
  -        if ( loader  != null)
  -        {
  -            return true;
  -        }
  -
  -        return false;
  +        return (Runtime.getLoaderNameForResource(templateName) != null);
       }
   } 
  -
  -
  -
  -
  -
  -
  -
  -
  
  
  

Reply via email to