jvanzyl     00/11/27 16:38:45

  Modified:    src/java/org/apache/velocity/runtime/directive Include.java
                        Parse.java
  Log:
  - Moved properties used by the include/parse directives into the
    RuntimeConstants class, properties are now reference via
    the Runtime.
  
  Revision  Changes    Path
  1.7       +3 -6      
jakarta-velocity/src/java/org/apache/velocity/runtime/directive/Include.java
  
  Index: Include.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-velocity/src/java/org/apache/velocity/runtime/directive/Include.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- Include.java      2000/11/28 00:21:03     1.6
  +++ Include.java      2000/11/28 00:38:40     1.7
  @@ -93,7 +93,7 @@
    *
    * @author <a href="mailto:[EMAIL PROTECTED]">Geir Magnusson Jr.</a>
    * @author <a href="mailto:[EMAIL PROTECTED]">Jason van Zyl</a>
  - * @version $Id: Include.java,v 1.6 2000/11/28 00:21:03 jvanzyl Exp $
  + * @version $Id: Include.java,v 1.7 2000/11/28 00:38:40 jvanzyl Exp $
    */
   public class Include extends Directive
   {
  @@ -113,9 +113,6 @@
        */
       public int DIRECTIVE_TYPE = LINE;
       
  -    private static String ERRORMSG_START =  "include.output.errormsg.start";
  -    private static String ERRORMSG_END  = "include.output.errormsg.end";
  -    
       /**
        *  iterates through the argument list and renders every
        *  argument that is appropriate.  Any non appropriate
  @@ -265,8 +262,8 @@
       private void outputErrorToStream( Writer writer, String msg )
           throws IOException
       {
  -        String strOutputMsgStart = Runtime.getString( ERRORMSG_START);
  -        String strOutputMsgEnd = Runtime.getString( ERRORMSG_END );
  +        String strOutputMsgStart = Runtime.getString(Runtime.ERRORMSG_START);
  +        String strOutputMsgEnd = Runtime.getString(Runtime.ERRORMSG_END );
           
           if ( strOutputMsgStart != null  && strOutputMsgEnd != null)
           {
  
  
  
  1.6       +1 -1      
jakarta-velocity/src/java/org/apache/velocity/runtime/directive/Parse.java
  
  Index: Parse.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-velocity/src/java/org/apache/velocity/runtime/directive/Parse.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Parse.java        2000/11/28 00:21:04     1.5
  +++ Parse.java        2000/11/28 00:38:41     1.6
  @@ -83,7 +83,7 @@
    *
    * @author <a href="mailto:[EMAIL PROTECTED]">Geir Magnusson Jr.</a>
    * @author <a href="mailto:[EMAIL PROTECTED]">Jason van Zyl</a>
  - * @version $Id: Parse.java,v 1.5 2000/11/28 00:21:04 jvanzyl Exp $
  + * @version $Id: Parse.java,v 1.6 2000/11/28 00:38:41 jvanzyl Exp $
    */
   public class Parse extends Directive
   {
  @@ -226,7 +226,7 @@
            *  see if we have exceeded the configured depth.  If it isn't configured, 
put a stop at 20 just in case.
            */
   
  -        if (iParseDepth_ >= Runtime.getInt("parse_directive.maxdepth", 20))
  +        if (iParseDepth_ >= Runtime.getInt(Runtime.PARSE_DIRECTIVE_MAXDEPTH, 20))
                   throw new ParseDirectiveException("Max recursion depth reached.", 
iParseDepth_);
   
           return;
  
  
  

Reply via email to