You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by he...@apache.org on 2006/09/19 23:00:26 UTC
svn commit: r447969 [4/10] - in /jakarta/velocity/engine/trunk: ./ build/
build/xsl/ examples/anakia/build/ examples/anakia/xdocs/
examples/anakia/xdocs/about/ examples/anakia/xdocs/stylesheets/
examples/app_example1/ examples/app_example2/ examples/co...
Modified: jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/directive/Include.java
URL: http://svn.apache.org/viewvc/jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/directive/Include.java?view=diff&rev=447969&r1=447968&r2=447969
==============================================================================
--- jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/directive/Include.java (original)
+++ jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/directive/Include.java Tue Sep 19 14:00:14 2006
@@ -1,4 +1,3 @@
-
package org.apache.velocity.runtime.directive;
/*
@@ -31,8 +30,8 @@
import org.apache.velocity.runtime.resource.Resource;
/**
- * <p>Pluggable directive that handles the #include() statement in VTL.
- * This #include() can take multiple arguments of either
+ * <p>Pluggable directive that handles the #include() statement in VTL.
+ * This #include() can take multiple arguments of either
* StringLiteral or Reference.</p>
*
* <p>Notes:</p>
@@ -47,7 +46,7 @@
* include.output.errormsg.start
* include.output.errormsg.end
* If both are defined in velocity.properties, they will be used to
- * in the render output to bracket the arg string that caused the
+ * in the render output to bracket the arg string that caused the
* problem.
* Ex. : if you are working in html then
* include.output.errormsg.start=<!-- #include error :
@@ -77,8 +76,8 @@
public String getName()
{
return "include";
- }
-
+ }
+
/**
* Return type of this directive.
* @return The type of this directive.
@@ -86,18 +85,18 @@
public int getType()
{
return LINE;
- }
+ }
/**
* simple init - init the tree and get the elementKey from
* the AST
- * @param rs
- * @param context
- * @param node
- * @throws Exception
+ * @param rs
+ * @param context
+ * @param node
+ * @throws Exception
*/
public void init(RuntimeServices rs, InternalContextAdapter context,
- Node node)
+ Node node)
throws Exception
{
super.init( rs, context, node );
@@ -108,24 +107,24 @@
*/
outputMsgStart = rsvc.getString(RuntimeConstants.ERRORMSG_START);
outputMsgStart = outputMsgStart + " ";
-
+
outputMsgEnd = rsvc.getString(RuntimeConstants.ERRORMSG_END );
- outputMsgEnd = " " + outputMsgEnd;
+ outputMsgEnd = " " + outputMsgEnd;
}
/**
* iterates through the argument list and renders every
* argument that is appropriate. Any non appropriate
* arguments are logged, but render() continues.
- * @param context
- * @param writer
- * @param node
+ * @param context
+ * @param writer
+ * @param node
* @return True if the directive rendered successfully.
- * @throws IOException
- * @throws MethodInvocationException
- * @throws ResourceNotFoundException
+ * @throws IOException
+ * @throws MethodInvocationException
+ * @throws ResourceNotFoundException
*/
- public boolean render(InternalContextAdapter context,
+ public boolean render(InternalContextAdapter context,
Writer writer, Node node)
throws IOException, MethodInvocationException,
ResourceNotFoundException
@@ -144,22 +143,22 @@
Node n = node.jjtGetChild(i);
- if ( n.getType() == ParserTreeConstants.JJTSTRINGLITERAL ||
+ if ( n.getType() == ParserTreeConstants.JJTSTRINGLITERAL ||
n.getType() == ParserTreeConstants.JJTREFERENCE )
{
if (!renderOutput( n, context, writer ))
- outputErrorToStream( writer, "error with arg " + i
+ outputErrorToStream( writer, "error with arg " + i
+ " please see log.");
}
else
{
rsvc.getLog().error("#include() invalid argument type: "
+ n.toString());
- outputErrorToStream( writer, "error with arg " + i
+ outputErrorToStream( writer, "error with arg " + i
+ " please see log.");
}
}
-
+
return true;
}
@@ -268,7 +267,7 @@
*/
private void outputErrorToStream( Writer writer, String msg )
throws IOException
- {
+ {
if ( outputMsgStart != null && outputMsgEnd != null)
{
writer.write(outputMsgStart);
Modified: jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/directive/InputBase.java
URL: http://svn.apache.org/viewvc/jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/directive/InputBase.java?view=diff&rev=447969&r1=447968&r2=447969
==============================================================================
--- jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/directive/InputBase.java (original)
+++ jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/directive/InputBase.java Tue Sep 19 14:00:14 2006
@@ -39,7 +39,7 @@
*
* @param context The context to derive the default input encoding
* from.
- * @return The encoding to use when processing this directive.
+ * @return The encoding to use when processing this directive.
*/
protected String getInputEncoding(InternalContextAdapter context)
{
Modified: jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/directive/Literal.java
URL: http://svn.apache.org/viewvc/jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/directive/Literal.java?view=diff&rev=447969&r1=447968&r2=447969
==============================================================================
--- jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/directive/Literal.java (original)
+++ jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/directive/Literal.java Tue Sep 19 14:00:14 2006
@@ -35,7 +35,7 @@
public class Literal extends Directive
{
String literalText;
-
+
/**
* Return name of this directive.
* @return The name of this directive.
@@ -43,8 +43,8 @@
public String getName()
{
return "literal";
- }
-
+ }
+
/**
* Return type of this directive.
* @return The type of this directive.
@@ -52,15 +52,15 @@
public int getType()
{
return BLOCK;
- }
+ }
/**
* Store the literal rendition of a node using
* the Node.literal().
- * @param rs
- * @param context
- * @param node
- * @throws Exception
+ * @param rs
+ * @param context
+ * @param node
+ * @throws Exception
*/
public void init(RuntimeServices rs, InternalContextAdapter context,
Node node)
@@ -69,18 +69,18 @@
super.init( rs, context, node );
literalText = node.jjtGetChild(0).literal();
- }
+ }
/**
* Throw the literal rendition of the block between
* #literal()/#end into the writer.
- * @param context
- * @param writer
- * @param node
+ * @param context
+ * @param writer
+ * @param node
* @return True if the directive rendered successfully.
- * @throws IOException
+ * @throws IOException
*/
- public boolean render( InternalContextAdapter context,
+ public boolean render( InternalContextAdapter context,
Writer writer, Node node)
throws IOException
{
Modified: jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/directive/Macro.java
URL: http://svn.apache.org/viewvc/jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/directive/Macro.java?view=diff&rev=447969&r1=447968&r2=447969
==============================================================================
--- jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/directive/Macro.java (original)
+++ jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/directive/Macro.java Tue Sep 19 14:00:14 2006
@@ -44,7 +44,7 @@
* #end
* #end
*
- * This object is used at parse time to mainly process and register the
+ * This object is used at parse time to mainly process and register the
* macro. It is used inline in the parser when processing a directive.
*
* @author <a href="mailto:geirm@optonline.net">Geir Magnusson Jr.</a>
@@ -62,8 +62,8 @@
public String getName()
{
return "macro";
- }
-
+ }
+
/**
* Return type of this directive.
* @return The type of this directive.
@@ -71,20 +71,20 @@
public int getType()
{
return BLOCK;
- }
-
+ }
+
/**
* render() doesn't do anything in the final output rendering.
* There is no output from a #macro() directive.
- * @param context
- * @param writer
- * @param node
+ * @param context
+ * @param writer
+ * @param node
* @return True if the directive rendered successfully.
- * @throws IOException
+ * @throws IOException
*/
public boolean render(InternalContextAdapter context,
Writer writer, Node node)
- throws IOException
+ throws IOException
{
/*
* do nothing : We never render. The VelocimacroProxy object does that
@@ -92,7 +92,7 @@
return true;
}
-
+
/**
* @see org.apache.velocity.runtime.directive.Directive#init(org.apache.velocity.runtime.RuntimeServices, org.apache.velocity.context.InternalContextAdapter, org.apache.velocity.runtime.parser.node.Node)
*/
@@ -103,11 +103,11 @@
super.init(rs, context, node);
/*
- * again, don't do squat. We want the AST of the macro
- * block to hang off of this but we don't want to
+ * again, don't do squat. We want the AST of the macro
+ * block to hang off of this but we don't want to
* init it... it's useless...
*/
-
+
return;
}
@@ -120,20 +120,20 @@
* org.apache.velocity.runtime.directive.VelocimacroProxy}
* objects, and if not currently used, adds it to the macro
* Factory.
- * @param rs
- * @param t
- * @param node
- * @param sourceTemplate
- * @throws IOException
- * @throws ParseException
- */
+ * @param rs
+ * @param t
+ * @param node
+ * @param sourceTemplate
+ * @throws IOException
+ * @throws ParseException
+ */
public static void processAndRegister(RuntimeServices rs, Token t, Node node,
String sourceTemplate)
throws IOException, ParseException
{
/*
* There must be at least one arg to #macro,
- * the name of the VM. Note that 0 following
+ * the name of the VM. Note that 0 following
* args is ok for naming blocks of HTML
*/
@@ -144,14 +144,14 @@
* is for the block tree
*/
- if (numArgs < 2)
+ if (numArgs < 2)
{
-
+
/*
* error - they didn't name the macro or
* define a block
*/
-
+
rs.getLog().error("#macro error : Velocimacro must have name as 1st " +
"argument to #macro(). #args = " + numArgs);
@@ -178,18 +178,18 @@
*/
String argArray[] = getArgArray(node, rs);
-
+
/*
* now, try and eat the code block. Pass the root.
*/
-
- List macroArray =
+
+ List macroArray =
getASTAsStringArray(node.jjtGetChild(numArgs - 1));
-
+
/*
* make a big string out of our macro
*/
-
+
StringBuffer macroBody = new StringBuffer();
for (int i=0; i < macroArray.size(); i++)
@@ -198,7 +198,7 @@
}
/*
- * now, try to add it. The Factory controls permissions,
+ * now, try to add it. The Factory controls permissions,
* so just give it a whack...
*/
@@ -215,7 +215,7 @@
}
}
-
+
/**
* Creates an array containing the literal text from the macro
* arguement(s) (including the macro's name as the first arg).
@@ -234,15 +234,15 @@
*/
int numArgs = node.jjtGetNumChildren();
numArgs--; // avoid the block tree...
-
+
String argArray[] = new String[numArgs];
-
+
int i = 0;
-
+
/*
* eat the args
*/
-
+
while (i < numArgs)
{
argArray[i] = node.jjtGetChild(i).getFirstToken().image;
@@ -263,7 +263,7 @@
i++;
}
-
+
if (debugMode)
{
StringBuffer msg = new StringBuffer("Macro.getArgArray() : nbrArgs=");
@@ -271,7 +271,7 @@
macroToString(msg, argArray);
rsvc.getLog().debug(msg);
}
-
+
return argArray;
}
@@ -281,10 +281,10 @@
private static List getASTAsStringArray(Node rootNode)
{
/*
- * this assumes that we are passed in the root
+ * this assumes that we are passed in the root
* node of the code block
*/
-
+
Token t = rootNode.getFirstToken();
Token tLast = rootNode.getLastToken();
Modified: jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/directive/Parse.java
URL: http://svn.apache.org/viewvc/jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/directive/Parse.java?view=diff&rev=447969&r1=447968&r2=447969
==============================================================================
--- jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/directive/Parse.java (original)
+++ jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/directive/Parse.java Tue Sep 19 14:00:14 2006
@@ -36,13 +36,13 @@
* <pre>
* Notes:
* -----
- * 1) The parsed source material can only come from somewhere in
- * the TemplateRoot tree for security reasons. There is no way
+ * 1) The parsed source material can only come from somewhere in
+ * the TemplateRoot tree for security reasons. There is no way
* around this. If you want to include content from elsewhere on
- * your disk, use a link from somwhere under Template Root to that
+ * your disk, use a link from somwhere under Template Root to that
* content.
*
- * 2) There is a limited parse depth. It is set as a property
+ * 2) There is a limited parse depth. It is set as a property
* "parse_directive.maxdepth = 10" for example. There is a 20 iteration
* safety in the event that the parameter isn't set.
* </pre>
@@ -61,8 +61,8 @@
public String getName()
{
return "parse";
- }
-
+ }
+
/**
* Return type of this directive.
* @return The type of this directive.
@@ -70,20 +70,20 @@
public int getType()
{
return LINE;
- }
-
+ }
+
/**
* iterates through the argument list and renders every
* argument that is appropriate. Any non appropriate
* arguments are logged, but render() continues.
- * @param context
- * @param writer
- * @param node
+ * @param context
+ * @param writer
+ * @param node
* @return True if the directive rendered successfully.
- * @throws IOException
- * @throws ResourceNotFoundException
- * @throws ParseErrorException
- * @throws MethodInvocationException
+ * @throws IOException
+ * @throws ResourceNotFoundException
+ * @throws ParseErrorException
+ * @throws MethodInvocationException
*/
public boolean render( InternalContextAdapter context,
Writer writer, Node node)
@@ -94,11 +94,11 @@
* if rendering is no longer allowed (after a stop), we can safely
* skip execution of all the parse directives.
*/
- if(!context.getAllowRendering())
+ if(!context.getAllowRendering())
{
return true;
}
-
+
/*
* did we get an argument?
*/
Modified: jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/directive/VMProxyArg.java
URL: http://svn.apache.org/viewvc/jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/directive/VMProxyArg.java?view=diff&rev=447969&r1=447968&r2=447969
==============================================================================
--- jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/directive/VMProxyArg.java (original)
+++ jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/directive/VMProxyArg.java Tue Sep 19 14:00:14 2006
@@ -44,7 +44,7 @@
* In other words, it's created by the VelocimacroProxy class, to represent
* one of the arguments to a VM in a specific template. Since the template
* is fixed (it's a file...), we don't have to worry that the args to the VM
- * will change. Yes, the VM will be called in other templates, or in other
+ * will change. Yes, the VM will be called in other templates, or in other
* places on the same template, bit those are different use-instances.
*
* These arguments can be, in the lingo of
@@ -59,21 +59,21 @@
* <li> True() : true
* <li> False() : false
* <li>Word() : not likely - this is simply allowed by the parser so we can have
- * syntactical sugar like #foreach($a in $b) where 'in' is the Word
+ * syntactical sugar like #foreach($a in $b) where 'in' is the Word
* </ul>
* Now, Reference(), StringLit, IntegerLiteral, IntRange, ObjArr are all dynamic things, so
* their value is gotten with the use of a context. The others are constants. The trick
- * we rely on is that the context rather than this class really represents the
- * state of the argument. We are simply proxying for the thing, returning the proper value
+ * we rely on is that the context rather than this class really represents the
+ * state of the argument. We are simply proxying for the thing, returning the proper value
* when asked, and storing the proper value in the appropriate context when asked.
*
* So, the hope here, so an instance of this can be shared across threads, is to
- * keep any dynamic stuff out of it, relying on trick of having the appropriate
- * context handed to us, and when a constant argument, letting VMContext punch that
+ * keep any dynamic stuff out of it, relying on trick of having the appropriate
+ * context handed to us, and when a constant argument, letting VMContext punch that
* into a local context.
- *
+ *
* @author <a href="mailto:geirm@optonline.net">Geir Magnusson Jr.</a>
- * @version $Id$
+ * @version $Id$
*/
public class VMProxyArg
{
@@ -94,7 +94,7 @@
/** our identity in the current context */
private String contextReference = null;
-
+
/** the reference we are proxying for */
private String callerReference = null;
@@ -108,11 +108,11 @@
private Log log = null;
/**
- * ctor for current impl
+ * ctor for current impl
*
- * takes the reference literal we are proxying for, the literal
+ * takes the reference literal we are proxying for, the literal
* the VM we are for is called with...
- * @param rs
+ * @param rs
*
* @param contextRef reference arg in the definition of the VM, used in the VM
* @param callerRef reference used by the caller as an arg to the VM
@@ -126,15 +126,15 @@
contextReference = contextRef;
callerReference = callerRef;
type = t;
-
+
/*
* make our AST if necessary
*/
setup();
/*
- * if we are multi-node tree, then save the size to
- * avoid fn call overhead
+ * if we are multi-node tree, then save the size to
+ * avoid fn call overhead
*/
if( nodeTree != null)
{
@@ -177,7 +177,7 @@
* @return Object currently null
*/
public Object setObject( InternalContextAdapter context, Object o )
- {
+ {
/*
* if we are a reference, we could be updating a property
*/
@@ -188,7 +188,7 @@
{
/*
* we are a property, and being updated such as
- * #foo( $bar.BangStart)
+ * #foo( $bar.BangStart)
*/
try
@@ -197,7 +197,7 @@
}
catch( MethodInvocationException mie )
{
- log.error("VMProxyArg.getObject() : method invocation error setting value", mie);
+ log.error("VMProxyArg.getObject() : method invocation error setting value", mie);
}
}
else
@@ -208,14 +208,14 @@
*/
context.put( singleLevelRef, o);
-
+
// alternate impl : usercontext.put( singleLevelRef, o);
}
}
else
{
/*
- * if we aren't a reference, then we simply switch type,
+ * if we aren't a reference, then we simply switch type,
* get a new value, and it doesn't go into the context
*
* in current impl, this shouldn't happen.
@@ -231,7 +231,7 @@
return null;
}
-
+
/**
* returns the value of the reference. Generally, this is only
* called for dynamic proxies, as the static ones should have
@@ -242,7 +242,7 @@
*
*/
public Object getObject( InternalContextAdapter context )
- {
+ {
try
{
@@ -251,19 +251,19 @@
*/
Object retObject = null;
-
- if ( type == ParserTreeConstants.JJTREFERENCE )
- {
+
+ if ( type == ParserTreeConstants.JJTREFERENCE )
+ {
/*
* two cases : scalar reference ($foo) or multi-level ($foo.bar....)
*/
-
+
if ( numTreeChildren == 0)
- {
+ {
/*
* if I am a single-level reference, can I not get get it out of my context?
*/
-
+
retObject = context.get( singleLevelRef );
}
else
@@ -285,7 +285,7 @@
}
else if ( type == ParserTreeConstants.JJTINTEGERRANGE)
{
- retObject = nodeTree.value( context );
+ retObject = nodeTree.value( context );
}
else if( type == ParserTreeConstants.JJTTRUE )
{
@@ -312,12 +312,12 @@
/*
* this really shouldn't happen. text is just a thowaway arg for #foreach()
*/
-
- try
+
+ try
{
StringWriter writer =new StringWriter();
nodeTree.render( context, writer );
-
+
retObject = writer;
}
/**
@@ -338,24 +338,24 @@
}
else
{
- log.error("Unsupported VM arg type : VM arg = " +
- callerReference +" type = " + type +
+ log.error("Unsupported VM arg type : VM arg = " +
+ callerReference +" type = " + type +
"( VMProxyArg.getObject() )");
}
-
+
return retObject;
}
catch( MethodInvocationException mie )
{
/*
- * not ideal, but otherwise we propogate out to the
- * VMContext, and the Context interface's put/get
+ * not ideal, but otherwise we propogate out to the
+ * VMContext, and the Context interface's put/get
* don't throw. So this is a the best compromise
* I can think of
*/
-
+
log.error("VMProxyArg.getObject() : method invocation error getting value", mie);
-
+
return null;
}
}
@@ -367,7 +367,7 @@
*/
private void setup()
{
- switch( type )
+ switch( type )
{
case ParserTreeConstants.JJTINTEGERRANGE :
@@ -380,14 +380,14 @@
/*
* dynamic types, just render
*/
-
+
constant = false;
try
{
/*
* fakie : wrap in directive to get the parser to treat our args as args
- * it doesn't matter that #include() can't take all these types, because we
+ * it doesn't matter that #include() can't take all these types, because we
* just want the parser to consider our arg as a Directive/VM arg rather than
* as if inline in schmoo
*/
@@ -428,7 +428,7 @@
nodeTree.init(ica, rsvc);
}
- }
+ }
/**
* pass through application level runtime exceptions
*/
@@ -436,15 +436,15 @@
{
throw e;
}
- catch ( Exception e )
+ catch ( Exception e )
{
- log.error("VMProxyArg.setup() : exception " +
+ log.error("VMProxyArg.setup() : exception " +
callerReference, e);
}
break;
}
-
+
case ParserTreeConstants.JJTTRUE :
{
constant = true;
@@ -486,10 +486,10 @@
break;
}
-
+
default :
{
- log.error("VMProxyArg.setup() : unsupported type : "
+ log.error("VMProxyArg.setup() : unsupported type : "
+ callerReference );
}
}
@@ -503,12 +503,12 @@
* not used in current impl
*
* Constructor for alternate impl where VelProxy class would make new
- * VMProxyArg objects, and use this contructor to avoid reparsing the
+ * VMProxyArg objects, and use this contructor to avoid reparsing the
* reference args
*
* that impl also had the VMProxyArg carry it's context.
- * @param model
- * @param c
+ * @param model
+ * @param c
*/
public VMProxyArg( VMProxyArg model, InternalContextAdapter c )
{
@@ -532,7 +532,7 @@
}
}
}
-
+
/**
* @return The caller reference.
*/
Modified: jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/directive/VelocimacroProxy.java
URL: http://svn.apache.org/viewvc/jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/directive/VelocimacroProxy.java?view=diff&rev=447969&r1=447968&r2=447969
==============================================================================
--- jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/directive/VelocimacroProxy.java (original)
+++ jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/directive/VelocimacroProxy.java Tue Sep 19 14:00:14 2006
@@ -38,7 +38,7 @@
* a proxy Directive-derived object to fit with the current directive system
*
* @author <a href="mailto:geirm@optonline.net">Geir Magnusson Jr.</a>
- * @version $Id$
+ * @version $Id$
*/
public class VelocimacroProxy extends Directive
{
@@ -59,40 +59,40 @@
* Return name of this Velocimacro.
* @return The name of this Velocimacro.
*/
- public String getName()
- {
- return macroName;
+ public String getName()
+ {
+ return macroName;
}
-
+
/**
* Velocimacros are always LINE
* type directives.
* @return The type of this directive.
*/
public int getType()
- {
- return LINE;
+ {
+ return LINE;
}
-
+
/**
* sets the directive name of this VM
- * @param name
+ * @param name
*/
public void setName( String name )
{
macroName = name;
}
-
+
/**
* sets the array of arguments specified in the macro definition
- * @param arr
+ * @param arr
*/
public void setArgArray( String [] arr )
{
argArray = arr;
/*
- * get the arg count from the arg array. remember that the arg array
+ * get the arg count from the arg array. remember that the arg array
* has the macro name as it's 0th element
*/
@@ -117,10 +117,10 @@
}
/**
- * Sets the orignal macro body. This is simply the cat of the macroArray, but the
+ * Sets the orignal macro body. This is simply the cat of the macroArray, but the
* Macro object creates this once during parsing, and everyone shares it.
* Note : it must not be modified.
- * @param mb
+ * @param mb
*/
public void setMacrobody( String mb )
{
@@ -137,23 +137,23 @@
/**
* Renders the macro using the context
- * @param context
- * @param writer
- * @param node
+ * @param context
+ * @param writer
+ * @param node
* @return True if the directive rendered successfully.
- * @throws IOException
- * @throws MethodInvocationException
+ * @throws IOException
+ * @throws MethodInvocationException
*/
public boolean render( InternalContextAdapter context, Writer writer, Node node)
throws IOException, MethodInvocationException
{
- try
+ try
{
/*
- * it's possible the tree hasn't been parsed yet, so get
+ * it's possible the tree hasn't been parsed yet, so get
* the VMManager to parse and init it
*/
-
+
if (nodeTree != null)
{
if ( !init )
@@ -161,7 +161,7 @@
nodeTree.init( context, rsvc);
init = true;
}
-
+
/*
* wrap the current context and add the VMProxyArg objects
*/
@@ -175,21 +175,21 @@
* the context.
*/
- VMProxyArg arg = (VMProxyArg) proxyArgHash.get( argArray[i] );
+ VMProxyArg arg = (VMProxyArg) proxyArgHash.get( argArray[i] );
vmc.addVMProxyArg( arg );
}
-
+
/*
* now render the VM
*/
- nodeTree.render( vmc, writer );
+ nodeTree.render( vmc, writer );
}
else
{
rsvc.getLog().error("VM error " + macroName + ". Null AST");
}
- }
+ }
/**
* pass through application level runtime exceptions
*/
@@ -206,10 +206,10 @@
throw e;
}
- catch ( Exception e )
+ catch ( Exception e )
{
- rsvc.getLog().error("VelocimacroProxy.render() : exception VM = #" +
+ rsvc.getLog().error("VelocimacroProxy.render() : exception VM = #" +
macroName + "()", e);
}
@@ -218,14 +218,14 @@
/**
* The major meat of VelocimacroProxy, init() checks the # of arguments, patches the
- * macro body, renders the macro into an AST, and then inits the AST, so it is ready
+ * macro body, renders the macro into an AST, and then inits the AST, so it is ready
* for quick rendering. Note that this is only AST dependant stuff. Not context.
- * @param rs
- * @param context
- * @param node
- * @throws Exception
+ * @param rs
+ * @param context
+ * @param node
+ * @throws Exception
*/
- public void init( RuntimeServices rs, InternalContextAdapter context, Node node)
+ public void init( RuntimeServices rs, InternalContextAdapter context, Node node)
throws Exception
{
super.init( rs, context, node );
@@ -233,17 +233,17 @@
/*
* how many args did we get?
*/
-
+
int i = node.jjtGetNumChildren();
-
+
/*
* right number of args?
*/
-
- if ( getNumArgs() != i )
+
+ if ( getNumArgs() != i )
{
rsvc.getLog().error("VM #" + macroName + ": error : too " +
- ((getNumArgs() > i) ? "few" : "many") +
+ ((getNumArgs() > i) ? "few" : "many") +
" arguments to macro. Wanted " + getNumArgs() +
" got " + i);
return;
@@ -254,7 +254,7 @@
*/
callingArgs = getArgArray( node );
-
+
/*
* now proxy each arg in the context
*/
@@ -266,9 +266,9 @@
/**
* basic VM setup. Sets up the proxy args for this
* use, and parses the tree
- * @param callArgs
- * @param callArgTypes
- * @return True if the proxy was setup successfully.
+ * @param callArgs
+ * @param callArgTypes
+ * @return True if the proxy was setup successfully.
*/
public boolean setupMacro( String[] callArgs, int[] callArgTypes )
{
@@ -284,8 +284,8 @@
*/
private void parseTree( String[] callArgs )
{
- try
- {
+ try
+ {
BufferedReader br = new BufferedReader( new StringReader( macroBody ) );
/*
@@ -322,13 +322,13 @@
}
/*
- * now make one of our reference-munging visitor, and
+ * now make one of our reference-munging visitor, and
* let 'er rip
*/
VMReferenceMungeVisitor v = new VMReferenceMungeVisitor( hm );
nodeTree.jjtAccept( v, null );
- }
+ }
/**
* pass through application level runtime exceptions
*/
@@ -336,13 +336,13 @@
{
throw e;
}
- catch ( Exception e )
+ catch ( Exception e )
{
- rsvc.getLog().error("VelocimacroManager.parseTree() : exception " +
+ rsvc.getLog().error("VelocimacroManager.parseTree() : exception " +
macroName, e);
}
}
-
+
private void setupProxyArgs( String[] callArgs, int [] callArgTypes )
{
/*
@@ -355,14 +355,14 @@
proxyArgHash.put( argArray[i], arg );
}
}
-
+
/**
* gets the args to the VM from the instance-use AST
*/
private String[] getArgArray( Node node )
{
int numArgs = node.jjtGetNumChildren();
-
+
String args[] = new String[ numArgs ];
callingArgTypes = new int[numArgs];
@@ -372,18 +372,18 @@
int i = 0;
Token t = null;
Token tLast = null;
-
- while( i < numArgs )
+
+ while( i < numArgs )
{
args[i] = "";
/*
- * we want string literalss to lose the quotes. #foo( "blargh" ) should have 'blargh' patched
+ * we want string literalss to lose the quotes. #foo( "blargh" ) should have 'blargh' patched
* into macro body. So for each arg in the use-instance, treat the stringlierals specially...
*/
callingArgTypes[i] = node.jjtGetChild(i).getType();
-
-
+
+
if (false && node.jjtGetChild(i).getType() == ParserTreeConstants.JJTSTRINGLITERAL )
{
args[i] += node.jjtGetChild(i).getFirstToken().image.substring(1, node.jjtGetChild(i).getFirstToken().image.length() - 1);
@@ -396,7 +396,7 @@
t = node.jjtGetChild(i).getFirstToken();
tLast = node.jjtGetChild(i).getLastToken();
- while( t != tLast )
+ while( t != tLast )
{
args[i] += t.image;
t = t.next;
Modified: jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/exception/NodeException.java
URL: http://svn.apache.org/viewvc/jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/exception/NodeException.java?view=diff&rev=447969&r1=447968&r2=447969
==============================================================================
--- jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/exception/NodeException.java (original)
+++ jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/exception/NodeException.java Tue Sep 19 14:00:14 2006
@@ -34,8 +34,8 @@
*/
public NodeException(String exceptionMessage, Node node)
{
- super(exceptionMessage + ": " + node.literal() +
+ super(exceptionMessage + ": " + node.literal() +
" [line " + node.getLine() + ",column " +
node.getColumn() + "]");
- }
+ }
}
Modified: jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/exception/ReferenceException.java
URL: http://svn.apache.org/viewvc/jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/exception/ReferenceException.java?view=diff&rev=447969&r1=447968&r2=447969
==============================================================================
--- jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/exception/ReferenceException.java (original)
+++ jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/exception/ReferenceException.java Tue Sep 19 14:00:14 2006
@@ -22,7 +22,7 @@
* Exception thrown when a bad reference is found.
*
* @author <a href="mailto:geirm@optonline.net">Geir Magnusson Jr.</a>
- * @version $Id$
+ * @version $Id$
*/
public class ReferenceException extends Exception
{
@@ -38,7 +38,7 @@
public ReferenceException(String exceptionMessage, Node node)
{
super(exceptionMessage + " [line " + node.getLine() + ",column " +
- node.getColumn() + "] : " + node.literal() +
+ node.getColumn() + "] : " + node.literal() +
" is not a valid reference.");
- }
+ }
}
Modified: jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/AvalonLogChute.java
URL: http://svn.apache.org/viewvc/jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/AvalonLogChute.java?view=diff&rev=447969&r1=447968&r2=447969
==============================================================================
--- jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/AvalonLogChute.java (original)
+++ jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/AvalonLogChute.java Tue Sep 19 14:00:14 2006
@@ -51,8 +51,8 @@
if (name != null)
{
this.logger = Hierarchy.getDefaultHierarchy().getLoggerFor(name);
- }
- else
+ }
+ else
{
// use the toString() of RuntimeServices to make a unique logger
logger = Hierarchy.getDefaultHierarchy().getLoggerFor(rsvc.toString());
@@ -71,7 +71,7 @@
{
try
{
- VelocityFormatter vf =
+ VelocityFormatter vf =
new VelocityFormatter("%{time} %{message}\\n%{throwable}");
// make the target and keep the default behavior of not appending
@@ -89,8 +89,8 @@
}
/**
- * @param file
- * @throws Exception
+ * @param file
+ * @throws Exception
* @deprecated This method should not be used. It is here only to provide
* backwards compatibility for the deprecated AvalonLogSystem
* class, in case anyone used it and this method directly.
@@ -102,7 +102,7 @@
// nag the theoretical user
log(WARN_ID, "You shouldn't be using the init(String file) method!");
}
-
+
/**
* logs messages
*
@@ -115,7 +115,7 @@
* based on level, call the right logger method
* and prefix with the appropos prefix
*/
- switch (level)
+ switch (level)
{
case WARN_ID:
logger.warn(WARN_PREFIX + message );
@@ -143,11 +143,11 @@
*
* @param level severity level
* @param message complete error message
- * @param t
+ * @param t
*/
public void log(int level, String message, Throwable t)
{
- switch (level)
+ switch (level)
{
case WARN_ID:
logger.warn(WARN_PREFIX + message, t);
@@ -172,7 +172,7 @@
/**
* Checks to see whether the specified level is enabled.
- * @param level
+ * @param level
* @return True if the specified level is enabled.
*/
public boolean isLevelEnabled(int level)
@@ -196,7 +196,7 @@
/**
* Also do a shutdown if the object is destroy()'d.
- * @throws Throwable
+ * @throws Throwable
*/
protected void finalize() throws Throwable
{
Modified: jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/AvalonLogSystem.java
URL: http://svn.apache.org/viewvc/jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/AvalonLogSystem.java?view=diff&rev=447969&r1=447968&r2=447969
==============================================================================
--- jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/AvalonLogSystem.java (original)
+++ jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/AvalonLogSystem.java Tue Sep 19 14:00:14 2006
@@ -26,8 +26,8 @@
public class AvalonLogSystem extends AvalonLogChute implements LogSystem
{
/**
- * @param level
- * @param message
+ * @param level
+ * @param message
* @deprecated Use log(level, message).
*/
public void logVelocityMessage(int level, String message)
Modified: jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/HoldingLogChute.java
URL: http://svn.apache.org/viewvc/jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/HoldingLogChute.java?view=diff&rev=447969&r1=447968&r2=447969
==============================================================================
--- jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/HoldingLogChute.java (original)
+++ jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/HoldingLogChute.java Tue Sep 19 14:00:14 2006
@@ -22,9 +22,9 @@
/**
* Pre-init logger. I believe that this was suggested by
- * Carsten Ziegeler <cz...@sundn.de> and
+ * Carsten Ziegeler <cz...@sundn.de> and
* Jeroen C. van Gelderen. If this isn't correct, let me
- * know as this was a good idea...
+ * know as this was a good idea...
*
* @author <a href="mailto:geirm@optonline.net">Geir Magnusson Jr.</a>
* @author <a href="mailto:nbubna@apache.org">Nathan Bubna</a>
@@ -32,7 +32,7 @@
*/
class HoldingLogChute implements LogChute
{
- private Vector pendingMessages = new Vector();
+ private Vector pendingMessages = new Vector();
/**
* @see org.apache.velocity.runtime.log.LogChute#init(org.apache.velocity.runtime.RuntimeServices)
@@ -40,7 +40,7 @@
public void init(RuntimeServices rs) throws Exception
{
}
-
+
/**
* Logs messages. All we do is store them until 'later'.
*
@@ -89,7 +89,7 @@
/**
* Dumps the log messages this chute is holding into a new chute
- * @param newChute
+ * @param newChute
*/
public void transferTo(LogChute newChute)
{
@@ -112,8 +112,8 @@
newChute.log(level, message, (Throwable)data[2]);
}
}
- }
+ }
}
- }
+ }
}
Modified: jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/JdkLogChute.java
URL: http://svn.apache.org/viewvc/jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/JdkLogChute.java?view=diff&rev=447969&r1=447968&r2=447969
==============================================================================
--- jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/JdkLogChute.java (original)
+++ jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/JdkLogChute.java Tue Sep 19 14:00:14 2006
@@ -38,7 +38,7 @@
public static final String DEFAULT_LOG_NAME = "org.apache.velocity";
/**
- *
+ *
*/
protected Logger logger = null;
@@ -59,7 +59,7 @@
/**
* Returns the java.util.logging.Level that matches
* to the specified LogChute level.
- * @param level
+ * @param level
* @return The current log level of the JDK Logger.
*/
protected Level getJdkLevel(int level)
@@ -94,9 +94,9 @@
/**
* Send a log message from Velocity along with an exception or error
- * @param level
- * @param message
- * @param t
+ * @param level
+ * @param message
+ * @param t
*/
public void log(int level, String message, Throwable t)
{
Modified: jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/Log.java
URL: http://svn.apache.org/viewvc/jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/Log.java?view=diff&rev=447969&r1=447968&r2=447969
==============================================================================
--- jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/Log.java (original)
+++ jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/Log.java Tue Sep 19 14:00:14 2006
@@ -20,7 +20,7 @@
/**
* Convenient wrapper for LogChute functions. This implements
* the RuntimeLogger methods (and then some). It is hoped that
- * use of this will fully replace use of the RuntimeLogger.
+ * use of this will fully replace use of the RuntimeLogger.
*
* @author <a href="mailto:nbubna@apache.org">Nathan Bubna</a>
* @version $Id$
@@ -40,7 +40,7 @@
/**
* Creates a new Log that wraps the specified LogChute.
- * @param chute
+ * @param chute
*/
public Log(LogChute chute)
{
@@ -53,7 +53,7 @@
/**
* Updates the LogChute wrapped by this Log instance.
- * @param newLogChute
+ * @param newLogChute
*/
protected void setLogChute(LogChute newLogChute)
{
@@ -90,7 +90,7 @@
/**
* Log a trace message.
- * @param message
+ * @param message
*/
public void trace(Object message)
{
@@ -99,8 +99,8 @@
/**
* Log a trace message and accompanying Throwable.
- * @param message
- * @param t
+ * @param message
+ * @param t
*/
public void trace(Object message, Throwable t)
{
@@ -118,7 +118,7 @@
/**
* Log a debug message.
- * @param message
+ * @param message
*/
public void debug(Object message)
{
@@ -127,8 +127,8 @@
/**
* Log a debug message and accompanying Throwable.
- * @param message
- * @param t
+ * @param message
+ * @param t
*/
public void debug(Object message, Throwable t)
{
@@ -146,7 +146,7 @@
/**
* Log an info message.
- * @param message
+ * @param message
*/
public void info(Object message)
{
@@ -155,8 +155,8 @@
/**
* Log an info message and accompanying Throwable.
- * @param message
- * @param t
+ * @param message
+ * @param t
*/
public void info(Object message, Throwable t)
{
@@ -174,7 +174,7 @@
/**
* Log a warning message.
- * @param message
+ * @param message
*/
public void warn(Object message)
{
@@ -183,8 +183,8 @@
/**
* Log a warning message and accompanying Throwable.
- * @param message
- * @param t
+ * @param message
+ * @param t
*/
public void warn(Object message, Throwable t)
{
@@ -202,7 +202,7 @@
/**
* Log an error message.
- * @param message
+ * @param message
*/
public void error(Object message)
{
@@ -211,8 +211,8 @@
/**
* Log an error message and accompanying Throwable.
- * @param message
- * @param t
+ * @param message
+ * @param t
*/
public void error(Object message, Throwable t)
{
Modified: jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/Log4JLogChute.java
URL: http://svn.apache.org/viewvc/jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/Log4JLogChute.java?view=diff&rev=447969&r1=447968&r2=447969
==============================================================================
--- jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/Log4JLogChute.java (original)
+++ jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/Log4JLogChute.java Tue Sep 19 14:00:14 2006
@@ -39,7 +39,7 @@
public class Log4JLogChute implements LogChute
{
/**
- *
+ *
*/
public static final String RUNTIME_LOG_LOG4J_LOGGER =
"runtime.log.logsystem.log4j.logger";
@@ -133,7 +133,7 @@
*/
public void log(int level, String message)
{
- switch (level)
+ switch (level)
{
case LogChute.WARN_ID:
logger.warn(message);
@@ -168,7 +168,7 @@
*/
public void log(int level, String message, Throwable t)
{
- switch (level)
+ switch (level)
{
case LogChute.WARN_ID:
logger.warn(message, t);
@@ -230,7 +230,7 @@
/**
* Also do a shutdown if the object is destroy()'d.
- * @throws Throwable
+ * @throws Throwable
*/
protected void finalize() throws Throwable
{
Modified: jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/Log4JLogSystem.java
URL: http://svn.apache.org/viewvc/jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/Log4JLogSystem.java?view=diff&rev=447969&r1=447968&r2=447969
==============================================================================
--- jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/Log4JLogSystem.java (original)
+++ jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/Log4JLogSystem.java Tue Sep 19 14:00:14 2006
@@ -34,8 +34,8 @@
public class Log4JLogSystem extends Log4JLogChute implements LogSystem
{
/**
- * @param level
- * @param message
+ * @param level
+ * @param message
* @deprecated Use log(level, message).
*/
public void logVelocityMessage(int level, String message)
Modified: jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/LogChute.java
URL: http://svn.apache.org/viewvc/jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/LogChute.java?view=diff&rev=447969&r1=447968&r2=447969
==============================================================================
--- jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/LogChute.java (original)
+++ jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/LogChute.java Tue Sep 19 14:00:14 2006
@@ -52,7 +52,7 @@
/** ID for info messages. */
public final static int INFO_ID = 1;
-
+
/** ID for warning messages. */
public final static int WARN_ID = 2;
@@ -61,30 +61,30 @@
/**
* Initializes this LogChute.
- * @param rs
- * @throws Exception
+ * @param rs
+ * @throws Exception
*/
public void init(RuntimeServices rs) throws Exception;
/**
* Send a log message from Velocity.
- * @param level
- * @param message
+ * @param level
+ * @param message
*/
public void log(int level, String message);
/**
* Send a log message from Velocity along with an exception or error
- * @param level
- * @param message
- * @param t
+ * @param level
+ * @param message
+ * @param t
*/
public void log(int level, String message, Throwable t);
/**
* Tell whether or not a log level is enabled.
- * @param level
- * @return True if a level is enabled.
+ * @param level
+ * @return True if a level is enabled.
*/
public boolean isLevelEnabled(int level);
Modified: jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/LogChuteSystem.java
URL: http://svn.apache.org/viewvc/jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/LogChuteSystem.java?view=diff&rev=447969&r1=447968&r2=447969
==============================================================================
--- jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/LogChuteSystem.java (original)
+++ jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/LogChuteSystem.java Tue Sep 19 14:00:14 2006
@@ -34,7 +34,7 @@
/**
* Only classes in this package should be creating this.
* Users should not have to mess with this class.
- * @param wrapMe
+ * @param wrapMe
*/
protected LogChuteSystem(LogSystem wrapMe)
{
@@ -59,11 +59,11 @@
/**
* First passes off the message at the specified level,
- * then passes off stack trace of the Throwable as a
+ * then passes off stack trace of the Throwable as a
* 2nd message at the same level.
- * @param level
- * @param message
- * @param t
+ * @param level
+ * @param message
+ * @param t
*/
public void log(int level, String message, Throwable t)
{
Modified: jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/LogManager.java
URL: http://svn.apache.org/viewvc/jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/LogManager.java?view=diff&rev=447969&r1=447968&r2=447969
==============================================================================
--- jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/LogManager.java (original)
+++ jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/LogManager.java Tue Sep 19 14:00:14 2006
@@ -33,16 +33,16 @@
* The approach is :
* </p>
* <ul>
- * <li>
+ * <li>
* First try to see if the user is passing in a living object
* that is a LogChute, allowing the app to give its living
* custom loggers.
* </li>
- * <li>
+ * <li>
* Next, run through the (possible) list of classes specified
- * specified as loggers, taking the first one that appears to
+ * specified as loggers, taking the first one that appears to
* work. This is how we support finding logkit, log4j or
- * jdk logging, whichever is in the classpath and found first,
+ * jdk logging, whichever is in the classpath and found first,
* as all three are listed as defaults.
* </li>
* <li>
@@ -64,7 +64,7 @@
{
Log log = rsvc.getLog();
- /* If a LogChute or LogSystem instance was set as a configuation
+ /* If a LogChute or LogSystem instance was set as a configuation
* value, use that. This is any class the user specifies.
*/
Object o = rsvc.getProperty(RuntimeConstants.RUNTIME_LOG_LOGSYSTEM);
@@ -105,12 +105,12 @@
log.warn(o.getClass().getName() + " object set as runtime.log.logsystem is not a valid log implementation.");
}
}
-
- /* otherwise, see if a class was specified. You can put multiple
+
+ /* otherwise, see if a class was specified. You can put multiple
* classes, and we use the first one we find.
*
* Note that the default value of this property contains the
- * AvalonLogChute, the Log4JLogChute, and the JdkLogChute for
+ * AvalonLogChute, the Log4JLogChute, and the JdkLogChute for
* convenience - so we use whichever we find first.
*/
List classes = new ArrayList();
@@ -124,12 +124,12 @@
classes = (List) obj;
}
else if ( obj instanceof String)
- {
+ {
classes.add( obj );
}
/*
- * now run through the list, trying each. It's ok to
+ * now run through the list, trying each. It's ok to
* fail with a class not found, as we do this to also
* search out a default simple file logger
*/
@@ -177,13 +177,13 @@
}
}
}
-
- /* If the above failed, that means either the user specified a
+
+ /* If the above failed, that means either the user specified a
* logging class that we can't find, there weren't the necessary
* dependencies in the classpath for it, or there were the same
* problems for the default loggers, log4j and Java1.4+.
* Since we really don't know and we want to be sure the user knows
- * that something went wrong with the logging, let's fall back to the
+ * that something went wrong with the logging, let's fall back to the
* surefire StandardOutLogChute. No panicking or failing to log!!
*/
LogChute slc = new StandardOutLogChute();
@@ -195,9 +195,9 @@
/**
* Update the Log instance with the appropriate LogChute and other
* settings determined by the RuntimeServices.
- * @param log
- * @param rsvc
- * @throws Exception
+ * @param log
+ * @param rsvc
+ * @throws Exception
*/
public static void updateLog(Log log, RuntimeServices rsvc) throws Exception
{
Modified: jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/LogSystem.java
URL: http://svn.apache.org/viewvc/jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/LogSystem.java?view=diff&rev=447969&r1=447968&r2=447969
==============================================================================
--- jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/LogSystem.java (original)
+++ jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/LogSystem.java Tue Sep 19 14:00:14 2006
@@ -38,31 +38,31 @@
*/
public final static int DEBUG_ID = 0;
- /**
+ /**
* ID for info messages.
*/
public final static int INFO_ID = 1;
-
- /**
+
+ /**
* ID for warning messages.
*/
public final static int WARN_ID = 2;
- /**
+ /**
* ID for error messages.
*/
public final static int ERROR_ID = 3;
/**
* Initializes this LogSystem.
- * @param rs
- * @throws Exception
+ * @param rs
+ * @throws Exception
*/
public void init( RuntimeServices rs ) throws Exception;
/**
- * @param level
- * @param message
+ * @param level
+ * @param message
* @deprecated Use log(level, message).
*/
public void logVelocityMessage(int level, String message);
Modified: jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/NullLogChute.java
URL: http://svn.apache.org/viewvc/jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/NullLogChute.java?view=diff&rev=447969&r1=447968&r2=447969
==============================================================================
--- jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/NullLogChute.java (original)
+++ jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/NullLogChute.java Tue Sep 19 14:00:14 2006
@@ -34,7 +34,7 @@
public void init(RuntimeServices rs) throws Exception
{
}
-
+
/**
* logs messages to the great Garbage Collector in the sky
*
Modified: jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/NullLogSystem.java
URL: http://svn.apache.org/viewvc/jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/NullLogSystem.java?view=diff&rev=447969&r1=447968&r2=447969
==============================================================================
--- jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/NullLogSystem.java (original)
+++ jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/NullLogSystem.java Tue Sep 19 14:00:14 2006
@@ -27,8 +27,8 @@
public class NullLogSystem extends NullLogChute implements LogSystem
{
/**
- * @param level
- * @param message
+ * @param level
+ * @param message
* @deprecated Use log(level, message).
*/
public void logVelocityMessage(int level, String message)
Modified: jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/PrimordialLogSystem.java
URL: http://svn.apache.org/viewvc/jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/PrimordialLogSystem.java?view=diff&rev=447969&r1=447968&r2=447969
==============================================================================
--- jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/PrimordialLogSystem.java (original)
+++ jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/PrimordialLogSystem.java Tue Sep 19 14:00:14 2006
@@ -18,9 +18,9 @@
/**
* Pre-init logger. I believe that this was suggested by
- * Carsten Ziegeler <cz...@sundn.de> and
+ * Carsten Ziegeler <cz...@sundn.de> and
* Jeroen C. van Gelderen. If this isn't correct, let me
- * know as this was a good idea...
+ * know as this was a good idea...
*
* @author <a href="mailto:geirm@optonline.net">Geir Magnusson Jr.</a>
* @version $Id$
@@ -29,8 +29,8 @@
public class PrimordialLogSystem extends HoldingLogChute implements LogSystem
{
/**
- * @param level
- * @param message
+ * @param level
+ * @param message
* @deprecated Use log(level, message).
*/
public void logVelocityMessage(int level, String message)
@@ -39,11 +39,11 @@
}
/**
- * @param newLogger
+ * @param newLogger
* @deprecated use transferTo(LogChute newChute)
*/
public void dumpLogMessages( LogSystem newLogger )
{
transferTo(new LogChuteSystem(newLogger));
- }
+ }
}
Modified: jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/RuntimeLoggerLog.java
URL: http://svn.apache.org/viewvc/jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/RuntimeLoggerLog.java?view=diff&rev=447969&r1=447968&r2=447969
==============================================================================
--- jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/RuntimeLoggerLog.java (original)
+++ jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/RuntimeLoggerLog.java Tue Sep 19 14:00:14 2006
@@ -21,7 +21,7 @@
/**
* A temporary RuntimeLogger wrapper to make the deprecation
* of UberspectLoggable.setRuntimeLogger(RuntimeLogger) feasible.
- * This overrides all Log methods, either throwing
+ * This overrides all Log methods, either throwing
* UnsupportedOperationExceptions or passing things off to the
* theoretical RuntimeLogger used to create it. Oh, and all the
* is<Level>Enabled() methods return true. Of course, ideally
@@ -40,7 +40,7 @@
/**
* Creates a new Log that wraps a PrimordialLogChute.
- * @param rlog
+ * @param rlog
*/
public RuntimeLoggerLog(RuntimeLogger rlog)
{
Modified: jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/SimpleLog4JLogSystem.java
URL: http://svn.apache.org/viewvc/jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/SimpleLog4JLogSystem.java?view=diff&rev=447969&r1=447968&r2=447969
==============================================================================
--- jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/SimpleLog4JLogSystem.java (original)
+++ jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/SimpleLog4JLogSystem.java Tue Sep 19 14:00:14 2006
@@ -24,7 +24,7 @@
import org.apache.velocity.runtime.RuntimeServices;
/**
- * <p><em>This class is deprecated in favor of the new {@link Log4JLogChute},
+ * <p><em>This class is deprecated in favor of the new {@link Log4JLogChute},
* which makes use of Log4J's <code>Logger</code> rather than its deprecated
* <code>Category</code> class.</em></p>
*
@@ -46,7 +46,7 @@
protected Category logger = null;
/**
- *
+ *
*/
public SimpleLog4JLogSystem()
{
@@ -69,13 +69,13 @@
if ( categoryname != null )
{
logger = Category.getInstance( categoryname );
-
+
logVelocityMessage( 0,
"SimpleLog4JLogSystem using category '" + categoryname + "'");
return;
}
-
+
/*
* if not, use the file...
*/
@@ -89,12 +89,12 @@
{
internalInit( logfile );
- logVelocityMessage( 0,
+ logVelocityMessage( 0,
"SimpleLog4JLogSystem initialized using logfile '" + logfile + "'" );
}
catch( Exception e )
{
- System.err.println(
+ System.err.println(
"PANIC : error configuring SimpleLog4JLogSystem : " + e );
}
}
@@ -106,7 +106,7 @@
throws Exception
{
/*
- * do it by our classname to avoid conflicting with anything else
+ * do it by our classname to avoid conflicting with anything else
* that might be used...
*/
@@ -114,17 +114,17 @@
logger.setAdditivity(false);
/*
- * Priority is set for DEBUG becouse this implementation checks
+ * Priority is set for DEBUG becouse this implementation checks
* log level.
*/
logger.setLevel(Level.DEBUG);
appender = new RollingFileAppender( new PatternLayout( "%d - %m%n"), logfile, true);
-
+
appender.setMaxBackupIndex( 1 );
-
+
appender.setMaximumFileSize( 100000 );
-
+
logger.addAppender(appender);
}
@@ -136,7 +136,7 @@
*/
public void logVelocityMessage(int level, String message)
{
- switch (level)
+ switch (level)
{
case LogSystem.WARN_ID:
logger.warn( message );
@@ -158,7 +158,7 @@
/**
* Also do a shutdown if the object is destroy()'d.
- * @throws Throwable
+ * @throws Throwable
*/
protected void finalize() throws Throwable
{
Modified: jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/StandardOutLogChute.java
URL: http://svn.apache.org/viewvc/jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/StandardOutLogChute.java?view=diff&rev=447969&r1=447968&r2=447969
==============================================================================
--- jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/StandardOutLogChute.java (original)
+++ jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/StandardOutLogChute.java Tue Sep 19 14:00:14 2006
@@ -27,7 +27,7 @@
public class StandardOutLogChute implements LogChute
{
/** */
- public static final String RUNTIME_LOG_LEVEL_KEY =
+ public static final String RUNTIME_LOG_LEVEL_KEY =
"runtime.log.logsystem.stdout.level";
private int enabled = TRACE_ID;
@@ -100,9 +100,9 @@
/**
* Logs messages to the system console so long as the specified level
* is equal to or greater than the level this LogChute is enabled for.
- * If the level is equal to or greater than LogChute.ERROR_ID,
- * messages will be printed to System.err. Otherwise, they will be
- * printed to System.out. If a java.lang.Throwable accompanies the
+ * If the level is equal to or greater than LogChute.ERROR_ID,
+ * messages will be printed to System.err. Otherwise, they will be
+ * printed to System.out. If a java.lang.Throwable accompanies the
* message, it's stack trace will be printed to the same stream
* as the message.
*
@@ -142,7 +142,7 @@
/**
* Set the minimum level at which messages will be printed.
- * @param level
+ * @param level
*/
public void setEnabledLevel(int level)
{
@@ -162,7 +162,7 @@
* This will return true if the specified level
* is equal to or higher than the level this
* LogChute is enabled for.
- * @param level
+ * @param level
* @return True if logging is enabled for this level.
*/
public boolean isLevelEnabled(int level)
Modified: jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/VelocityFormatter.java
URL: http://svn.apache.org/viewvc/jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/VelocityFormatter.java?view=diff&rev=447969&r1=447968&r2=447969
==============================================================================
--- jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/VelocityFormatter.java (original)
+++ jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/log/VelocityFormatter.java Tue Sep 19 14:00:14 2006
@@ -31,7 +31,7 @@
{
super( format );
}
-
+
/**
* Utility method to format time.
*
Modified: jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/parser/Parser.jj
URL: http://svn.apache.org/viewvc/jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/parser/Parser.jj?view=diff&rev=447969&r1=447968&r2=447969
==============================================================================
--- jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/parser/Parser.jj (original)
+++ jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/parser/Parser.jj Tue Sep 19 14:00:14 2006
@@ -21,14 +21,14 @@
*/
options
-{
+{
/**
* The parser must be non-static in order for the
* above option to work, otherwise the parser value
* is passed in as null, which isn't all the useful ;)
*/
- STATIC=false;
+ STATIC=false;
/**
* Declare that we are accepting unicode input and
@@ -172,7 +172,7 @@
{
rsvc.getLog().error("Parser Exception: " + templateName, pe);
throw new TemplateParseException (pe.currentToken,
- pe.expectedTokenSequences, pe.tokenImage, currentTemplateName);
+ pe.expectedTokenSequences, pe.tokenImage, currentTemplateName);
}
catch (TokenMgrError tme)
{
@@ -675,10 +675,10 @@
}
-// treat the single line comment case separately
+// treat the single line comment case separately
// to avoid ##<EOF> errors
<*>
-TOKEN :
+TOKEN :
{
<SINGLE_LINE_COMMENT_START: "##">
{
@@ -862,7 +862,7 @@
SwitchTo(DIRECTIVE);
}
-| <ELSE_DIRECTIVE:
+| <ELSE_DIRECTIVE:
( "else" ( ( " " | "\t" )* ( "\n" | "\r" | "\r\n" ) )? )
| ( "{else}" ( ( " " | "\t" )* ( "\n" | "\r" | "\r\n" ) )? ) >
{
@@ -886,13 +886,13 @@
* treat FLOATING_POINT_LITERAL and INTEGER_LITERAL differently as a range can only handle integers.
*/
- /**
+ /**
* Note -- we also define an integer as ending with a double period,
* in order to avoid 1..3 being defined as floating point (1.) then a period, then a integer
*/
| <INTEGER_LITERAL: ("-")? (<DIGIT>)+ ("..")? >
{
-
+
/*
* Remove the double period if it is there
*/
@@ -900,7 +900,7 @@
input_stream.backup(2);
matchedToken.image = matchedToken.image.substring(0,matchedToken.image.length()-2);
}
-
+
/*
* check to see if we are in set
* ex. #set $foo = $foo + 3
@@ -1352,7 +1352,7 @@
return ParserTreeConstants.JJTINTEGERLITERAL;
}
/*
- * Need to put this before the floating point expansion
+ * Need to put this before the floating point expansion
*/
| LOOKAHEAD( <LBRACKET> [<WHITESPACE>] ( Reference() | IntegerLiteral()) [<WHITESPACE>] <DOUBLEDOT> ) IntegerRange()
{
@@ -1408,13 +1408,13 @@
*/
((t = <WORD>) | (t = <BRACKETED_WORD>))
- {
+ {
String directiveName;
- if (t.kind == ParserConstants.BRACKETED_WORD)
+ if (t.kind == ParserConstants.BRACKETED_WORD)
{
-
+
directiveName = t.image.substring(2,t.image.length() - 1);
- }
+ }
else
{
directiveName = t.image.substring(1);
@@ -1476,8 +1476,8 @@
argPos = 0;
}
-
-
+
+
/*
* if this is indeed a token, match the #foo ( arg ) pattern
*/
@@ -1742,7 +1742,7 @@
| True()
| False()
| Reference()
- | FloatingPointLiteral()
+ | FloatingPointLiteral()
)
[ <WHITESPACE>]
}
@@ -2662,7 +2662,7 @@
| Reference()
| IntegerLiteral()
| LOOKAHEAD( <LBRACKET> [<WHITESPACE>] ( Reference() | IntegerLiteral()) [<WHITESPACE>] <DOUBLEDOT> ) IntegerRange()
- | FloatingPointLiteral()
+ | FloatingPointLiteral()
| Map()
| ObjectArray()
| True()
Modified: jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/parser/TemplateParseException.java
URL: http://svn.apache.org/viewvc/jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/parser/TemplateParseException.java?view=diff&rev=447969&r1=447968&r2=447969
==============================================================================
--- jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/parser/TemplateParseException.java (original)
+++ jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/parser/TemplateParseException.java Tue Sep 19 14:00:14 2006
@@ -32,7 +32,7 @@
implements ExtendedParseException
{
private static final long serialVersionUID = -3146323135623083918L;
-
+
/**
* This is the name of the template which contains the parsing error, or
* null if not defined.
@@ -42,10 +42,10 @@
/**
* This constructor is used to add a template name
* to info cribbed from a ParseException generated in the parser.
- * @param currentTokenVal
- * @param expectedTokenSequencesVal
- * @param tokenImageVal
- * @param templateNameVal
+ * @param currentTokenVal
+ * @param expectedTokenSequencesVal
+ * @param tokenImageVal
+ * @param templateNameVal
*/
public TemplateParseException(Token currentTokenVal, int [][] expectedTokenSequencesVal, String [] tokenImageVal,
String templateNameVal)
@@ -65,9 +65,9 @@
* to force the "toString" method of parent class "Throwable" to
* print the error message in the form:
* ParseException: <result of getMessage>
- * @param currentTokenVal
- * @param expectedTokenSequencesVal
- * @param tokenImageVal
+ * @param currentTokenVal
+ * @param expectedTokenSequencesVal
+ * @param tokenImageVal
*/
public TemplateParseException(Token currentTokenVal, int [][] expectedTokenSequencesVal, String [] tokenImageVal)
{
Modified: jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/parser/TokenMgrError.java
URL: http://svn.apache.org/viewvc/jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/parser/TokenMgrError.java?view=diff&rev=447969&r1=447968&r2=447969
==============================================================================
--- jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/parser/TokenMgrError.java (original)
+++ jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/parser/TokenMgrError.java Tue Sep 19 14:00:14 2006
@@ -85,7 +85,7 @@
/**
* Returns a detailed message for the Error when it is thrown by the
* token manager to indicate a lexical error.
- * Parameters :
+ * Parameters :
* EOFSeen : indicates if EOF caused the lexicl error
* curLexState : lexical state in which this error occured
* errorLine : line number when the error occured
@@ -105,7 +105,7 @@
/**
* You can also modify the body of this method to customize your error messages.
* For example, cases like LOOP_DETECTED and INVALID_LEXICAL_STATE are not
- * of end-users concern, so you can return something like :
+ * of end-users concern, so you can return something like :
*
* "Internal Error : Please file a bug report .... "
*
Modified: jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/parser/VelocityCharStream.java
URL: http://svn.apache.org/viewvc/jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/parser/VelocityCharStream.java?view=diff&rev=447969&r1=447968&r2=447969
==============================================================================
--- jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/parser/VelocityCharStream.java (original)
+++ jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/parser/VelocityCharStream.java Tue Sep 19 14:00:14 2006
@@ -6,8 +6,8 @@
* fixes for CTORS, and mods to readChar().
*
* This is safe because we *always* use Reader with this class, and never a
- * InputStream. This guarantees that we have a correct stream of 16-bit
- * chars - all encoding transformations have been done elsewhere, so we
+ * InputStream. This guarantees that we have a correct stream of 16-bit
+ * chars - all encoding transformations have been done elsewhere, so we
* believe that there is no risk in doing this. Time will tell :)
*/
@@ -420,8 +420,8 @@
/**
* Method to adjust line and column numbers for the start of a token.<BR>
- * @param newLine
- * @param newCol
+ * @param newLine
+ * @param newCol
*/
public void adjustBeginLineColumn(int newLine, int newCol)
{
@@ -448,7 +448,7 @@
bufcolumn[j] = newCol + columnDiff;
columnDiff = nextColDiff;
i++;
- }
+ }
if (i < len)
{
Modified: jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/parser/node/ASTAddNode.java
URL: http://svn.apache.org/viewvc/jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/parser/node/ASTAddNode.java?view=diff&rev=447969&r1=447968&r2=447969
==============================================================================
--- jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/parser/node/ASTAddNode.java (original)
+++ jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/parser/node/ASTAddNode.java Tue Sep 19 14:00:14 2006
@@ -27,7 +27,7 @@
* @author <a href="mailto:pero@antaramusic.de">Peter Romianowski</a>
* @author <a href="mailto:jvanzyl@apache.org">Jason van Zyl</a>
* @author <a href="mailto:geirm@optonline.net">Geir Magnusson Jr.</a>
- * @version $Id$
+ * @version $Id$
*/
import org.apache.velocity.context.InternalContextAdapter;
import org.apache.velocity.runtime.parser.Parser;
@@ -69,9 +69,9 @@
/**
* computes the sum of the two nodes.
- * @param context
+ * @param context
* @return result or null
- * @throws MethodInvocationException
+ * @throws MethodInvocationException
*/
public Object value( InternalContextAdapter context)
throws MethodInvocationException
@@ -94,7 +94,7 @@
+ jjtGetChild( (left == null? 0 : 1) ).literal()
+ ") of addition operation has null value."
+ " Operation not possible. "
- + context.getCurrentTemplateName() + " [line " + getLine()
+ + context.getCurrentTemplateName() + " [line " + getLine()
+ ", column " + getColumn() + "]");
return null;
}
@@ -102,11 +102,11 @@
/*
* convert to Number if applicable
*/
- if (left instanceof TemplateNumber)
+ if (left instanceof TemplateNumber)
{
left = ( (TemplateNumber) left).getAsNumber();
}
- if (right instanceof TemplateNumber)
+ if (right instanceof TemplateNumber)
{
right = ( (TemplateNumber) right).getAsNumber();
}
@@ -114,7 +114,7 @@
/*
* Arithmetic operation.
*/
- if (left instanceof Number && right instanceof Number)
+ if (left instanceof Number && right instanceof Number)
{
return MathUtils.add((Number)left, (Number)right);
}
Modified: jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/parser/node/ASTAndNode.java
URL: http://svn.apache.org/viewvc/jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/parser/node/ASTAndNode.java?view=diff&rev=447969&r1=447968&r2=447969
==============================================================================
--- jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/parser/node/ASTAndNode.java (original)
+++ jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/parser/node/ASTAndNode.java Tue Sep 19 14:00:14 2006
@@ -27,7 +27,7 @@
*
* @author <a href="mailto:jvanzyl@apache.org">Jason van Zyl</a>
* @author <a href="mailto:geirm@optonline.net">Geir Magnusson Jr.</a>
- * @version $Id$
+ * @version $Id$
*/
public class ASTAndNode extends SimpleNode
{
@@ -60,9 +60,9 @@
* Returns the value of the expression.
* Since the value of the expression is simply the boolean
* result of evaluate(), lets return that.
- * @param context
+ * @param context
* @return The value of the expression.
- * @throws MethodInvocationException
+ * @throws MethodInvocationException
*/
public Object value(InternalContextAdapter context)
throws MethodInvocationException
@@ -72,17 +72,17 @@
}
/**
- * logical and :
+ * logical and :
* null && right = false
* left && null = false
* null && null = false
- * @param context
+ * @param context
* @return True if both sides are true.
- * @throws MethodInvocationException
- */
+ * @throws MethodInvocationException
+ */
public boolean evaluate( InternalContextAdapter context)
throws MethodInvocationException
- {
+ {
Node left = jjtGetChild(0);
Node right = jjtGetChild(1);
@@ -94,11 +94,11 @@
{
log.error((left == null ? "Left" : "Right") + " side of '&&' operation is null."
+ " Operation not possible. "
- + context.getCurrentTemplateName() + " [line " + getLine()
+ + context.getCurrentTemplateName() + " [line " + getLine()
+ ", column " + getColumn() + "]");
return false;
}
-
+
/*
* short circuit the test. Don't eval the RHS if the LHS is false
*/
@@ -109,8 +109,8 @@
{
return true;
}
- }
-
+ }
+
return false;
}
}
Modified: jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/parser/node/ASTBlock.java
URL: http://svn.apache.org/viewvc/jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/parser/node/ASTBlock.java?view=diff&rev=447969&r1=447968&r2=447969
==============================================================================
--- jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/parser/node/ASTBlock.java (original)
+++ jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/parser/node/ASTBlock.java Tue Sep 19 14:00:14 2006
@@ -69,7 +69,7 @@
for (i = 0; i < k; i++)
jjtGetChild(i).render(context, writer);
-
+
return true;
}
}
Modified: jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/parser/node/ASTComment.java
URL: http://svn.apache.org/viewvc/jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/parser/node/ASTComment.java?view=diff&rev=447969&r1=447968&r2=447969
==============================================================================
--- jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/parser/node/ASTComment.java (original)
+++ jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/parser/node/ASTComment.java Tue Sep 19 14:00:14 2006
@@ -51,7 +51,7 @@
* @param p
* @param id
*/
- public ASTComment(Parser p, int id)
+ public ASTComment(Parser p, int id)
{
super(p, id);
}
@@ -59,17 +59,17 @@
/**
* @see org.apache.velocity.runtime.parser.node.SimpleNode#jjtAccept(org.apache.velocity.runtime.parser.ParserVisitor, java.lang.Object)
*/
- public Object jjtAccept(ParserVisitor visitor, Object data)
+ public Object jjtAccept(ParserVisitor visitor, Object data)
{
return visitor.visit(this, data);
}
/**
* We need to make sure we catch any of the dreaded MORE tokens.
- * @param context
- * @param data
+ * @param context
+ * @param data
* @return The data object.
- * @throws Exception
+ * @throws Exception
*/
public Object init(InternalContextAdapter context, Object data)
throws Exception
@@ -102,7 +102,7 @@
{
writer.write(carr);
}
-
+
return true;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-dev-help@jakarta.apache.org