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 [7/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/visitor/NodeViewMode.java
URL: http://svn.apache.org/viewvc/jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/visitor/NodeViewMode.java?view=diff&rev=447969&r1=447968&r2=447969
==============================================================================
--- jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/visitor/NodeViewMode.java (original)
+++ jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/visitor/NodeViewMode.java Tue Sep 19 14:00:14 2006
@@ -97,17 +97,17 @@
String tokens = "";
String special = "";
Token t;
-
+
if (showTokens)
{
t = node.getFirstToken();
-
+
if (t.specialToken != null && ! t.specialToken.image.startsWith("##"))
special = t.specialToken.image;
-
+
tokens = " -> " + special + t.image;
- }
-
+ }
+
System.out.println(indentString() + node + tokens);
++indent;
data = node.childrenAccept(this, data);
@@ -119,146 +119,146 @@
* @see org.apache.velocity.runtime.visitor.BaseVisitor#visit(org.apache.velocity.runtime.parser.node.SimpleNode, java.lang.Object)
*/
public Object visit(SimpleNode node, Object data)
- {
+ {
return showNode(node,data);
}
-
+
/**
* @see org.apache.velocity.runtime.visitor.BaseVisitor#visit(org.apache.velocity.runtime.parser.node.ASTprocess, java.lang.Object)
*/
public Object visit(ASTprocess node, Object data)
- {
+ {
return showNode(node,data);
}
-
+
/**
* @see org.apache.velocity.runtime.visitor.BaseVisitor#visit(org.apache.velocity.runtime.parser.node.ASTExpression, java.lang.Object)
*/
public Object visit(ASTExpression node, Object data)
- {
+ {
return showNode(node,data);
}
-
+
/**
* @see org.apache.velocity.runtime.visitor.BaseVisitor#visit(org.apache.velocity.runtime.parser.node.ASTAssignment, java.lang.Object)
*/
public Object visit(ASTAssignment node, Object data)
- {
+ {
return showNode(node,data);
}
-
+
/**
* @see org.apache.velocity.runtime.visitor.BaseVisitor#visit(org.apache.velocity.runtime.parser.node.ASTOrNode, java.lang.Object)
*/
public Object visit(ASTOrNode node, Object data)
- {
+ {
return showNode(node,data);
}
-
+
/**
* @see org.apache.velocity.runtime.visitor.BaseVisitor#visit(org.apache.velocity.runtime.parser.node.ASTAndNode, java.lang.Object)
*/
public Object visit(ASTAndNode node, Object data)
- {
+ {
return showNode(node,data);
}
-
+
/**
* @see org.apache.velocity.runtime.visitor.BaseVisitor#visit(org.apache.velocity.runtime.parser.node.ASTEQNode, java.lang.Object)
*/
public Object visit(ASTEQNode node, Object data)
- {
+ {
return showNode(node,data);
}
-
+
/**
* @see org.apache.velocity.runtime.visitor.BaseVisitor#visit(org.apache.velocity.runtime.parser.node.ASTNENode, java.lang.Object)
*/
public Object visit(ASTNENode node, Object data)
- {
+ {
return showNode(node,data);
}
-
+
/**
* @see org.apache.velocity.runtime.visitor.BaseVisitor#visit(org.apache.velocity.runtime.parser.node.ASTLTNode, java.lang.Object)
*/
public Object visit(ASTLTNode node, Object data)
- {
+ {
return showNode(node,data);
}
-
+
/**
* @see org.apache.velocity.runtime.visitor.BaseVisitor#visit(org.apache.velocity.runtime.parser.node.ASTGTNode, java.lang.Object)
*/
public Object visit(ASTGTNode node, Object data)
- {
+ {
return showNode(node,data);
}
-
+
/**
* @see org.apache.velocity.runtime.visitor.BaseVisitor#visit(org.apache.velocity.runtime.parser.node.ASTLENode, java.lang.Object)
*/
public Object visit(ASTLENode node, Object data)
- {
+ {
return showNode(node,data);
}
-
+
/**
* @see org.apache.velocity.runtime.visitor.BaseVisitor#visit(org.apache.velocity.runtime.parser.node.ASTGENode, java.lang.Object)
*/
public Object visit(ASTGENode node, Object data)
- {
+ {
return showNode(node,data);
}
-
+
/**
* @see org.apache.velocity.runtime.visitor.BaseVisitor#visit(org.apache.velocity.runtime.parser.node.ASTAddNode, java.lang.Object)
*/
public Object visit(ASTAddNode node, Object data)
- {
+ {
return showNode(node,data);
}
-
+
/**
* @see org.apache.velocity.runtime.visitor.BaseVisitor#visit(org.apache.velocity.runtime.parser.node.ASTSubtractNode, java.lang.Object)
*/
public Object visit(ASTSubtractNode node, Object data)
- {
+ {
return showNode(node,data);
}
-
+
/**
* @see org.apache.velocity.runtime.visitor.BaseVisitor#visit(org.apache.velocity.runtime.parser.node.ASTMulNode, java.lang.Object)
*/
public Object visit(ASTMulNode node, Object data)
- {
+ {
return showNode(node,data);
}
-
+
/**
* @see org.apache.velocity.runtime.visitor.BaseVisitor#visit(org.apache.velocity.runtime.parser.node.ASTDivNode, java.lang.Object)
*/
public Object visit(ASTDivNode node, Object data)
- {
+ {
return showNode(node,data);
}
-
+
/**
* @see org.apache.velocity.runtime.visitor.BaseVisitor#visit(org.apache.velocity.runtime.parser.node.ASTModNode, java.lang.Object)
*/
public Object visit(ASTModNode node, Object data)
- {
+ {
return showNode(node,data);
}
-
+
/**
* @see org.apache.velocity.runtime.visitor.BaseVisitor#visit(org.apache.velocity.runtime.parser.node.ASTNotNode, java.lang.Object)
*/
public Object visit(ASTNotNode node, Object data)
- {
+ {
return showNode(node,data);
}
-
+
/**
* @see org.apache.velocity.runtime.visitor.BaseVisitor#visit(org.apache.velocity.runtime.parser.node.ASTFloatingPointLiteral, java.lang.Object)
*/
@@ -271,103 +271,103 @@
* @see org.apache.velocity.runtime.visitor.BaseVisitor#visit(org.apache.velocity.runtime.parser.node.ASTIntegerLiteral, java.lang.Object)
*/
public Object visit(ASTIntegerLiteral node, Object data)
- {
+ {
return showNode(node,data);
}
-
+
/**
* @see org.apache.velocity.runtime.visitor.BaseVisitor#visit(org.apache.velocity.runtime.parser.node.ASTStringLiteral, java.lang.Object)
*/
public Object visit(ASTStringLiteral node, Object data)
- {
+ {
return showNode(node,data);
}
-
+
/**
* @see org.apache.velocity.runtime.visitor.BaseVisitor#visit(org.apache.velocity.runtime.parser.node.ASTIdentifier, java.lang.Object)
*/
public Object visit(ASTIdentifier node, Object data)
- {
+ {
return showNode(node,data);
}
-
+
/**
* @see org.apache.velocity.runtime.visitor.BaseVisitor#visit(org.apache.velocity.runtime.parser.node.ASTMethod, java.lang.Object)
*/
public Object visit(ASTMethod node, Object data)
- {
+ {
return showNode(node,data);
}
-
+
/**
* @see org.apache.velocity.runtime.visitor.BaseVisitor#visit(org.apache.velocity.runtime.parser.node.ASTReference, java.lang.Object)
*/
public Object visit(ASTReference node, Object data)
- {
+ {
return showNode(node,data);
}
-
+
/**
* @see org.apache.velocity.runtime.visitor.BaseVisitor#visit(org.apache.velocity.runtime.parser.node.ASTTrue, java.lang.Object)
*/
public Object visit(ASTTrue node, Object data)
- {
+ {
return showNode(node,data);
}
-
+
/**
* @see org.apache.velocity.runtime.visitor.BaseVisitor#visit(org.apache.velocity.runtime.parser.node.ASTFalse, java.lang.Object)
*/
public Object visit(ASTFalse node, Object data)
- {
+ {
return showNode(node,data);
}
-
+
/**
* @see org.apache.velocity.runtime.visitor.BaseVisitor#visit(org.apache.velocity.runtime.parser.node.ASTBlock, java.lang.Object)
*/
public Object visit(ASTBlock node, Object data)
- {
+ {
return showNode(node,data);
}
-
+
/**
* @see org.apache.velocity.runtime.visitor.BaseVisitor#visit(org.apache.velocity.runtime.parser.node.ASTText, java.lang.Object)
*/
public Object visit(ASTText node, Object data)
- {
- return showNode(node,data);
+ {
+ return showNode(node,data);
}
-
+
/**
* @see org.apache.velocity.runtime.visitor.BaseVisitor#visit(org.apache.velocity.runtime.parser.node.ASTIfStatement, java.lang.Object)
*/
public Object visit(ASTIfStatement node, Object data)
- {
+ {
return showNode(node,data);
}
-
+
/**
* @see org.apache.velocity.runtime.visitor.BaseVisitor#visit(org.apache.velocity.runtime.parser.node.ASTElseStatement, java.lang.Object)
*/
public Object visit(ASTElseStatement node, Object data)
- {
+ {
return showNode(node,data);
}
-
+
/**
* @see org.apache.velocity.runtime.visitor.BaseVisitor#visit(org.apache.velocity.runtime.parser.node.ASTElseIfStatement, java.lang.Object)
*/
public Object visit(ASTElseIfStatement node, Object data)
- {
+ {
return showNode(node,data);
}
-
+
/**
* @see org.apache.velocity.runtime.visitor.BaseVisitor#visit(org.apache.velocity.runtime.parser.node.ASTObjectArray, java.lang.Object)
*/
public Object visit(ASTObjectArray node, Object data)
- {
+ {
return showNode(node,data);
}
@@ -375,7 +375,7 @@
* @see org.apache.velocity.runtime.visitor.BaseVisitor#visit(org.apache.velocity.runtime.parser.node.ASTDirective, java.lang.Object)
*/
public Object visit(ASTDirective node, Object data)
- {
+ {
return showNode(node,data);
}
@@ -383,15 +383,15 @@
* @see org.apache.velocity.runtime.visitor.BaseVisitor#visit(org.apache.velocity.runtime.parser.node.ASTWord, java.lang.Object)
*/
public Object visit(ASTWord node, Object data)
- {
+ {
return showNode(node,data);
}
-
+
/**
* @see org.apache.velocity.runtime.visitor.BaseVisitor#visit(org.apache.velocity.runtime.parser.node.ASTSetDirective, java.lang.Object)
*/
public Object visit(ASTSetDirective node, Object data)
- {
+ {
return showNode(node,data);
}
Modified: jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/visitor/VMReferenceMungeVisitor.java
URL: http://svn.apache.org/viewvc/jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/visitor/VMReferenceMungeVisitor.java?view=diff&rev=447969&r1=447968&r2=447969
==============================================================================
--- jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/visitor/VMReferenceMungeVisitor.java (original)
+++ jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/visitor/VMReferenceMungeVisitor.java Tue Sep 19 14:00:14 2006
@@ -21,14 +21,14 @@
import org.apache.velocity.runtime.parser.node.ASTReference;
/**
- * This class is a visitor used by the VM proxy to change the
+ * This class is a visitor used by the VM proxy to change the
* literal representation of a reference in a VM. The reason is
* to preserve the 'render literal if null' behavior w/o making
* the VMProxy stuff more complicated than it is already.
*
* @author <a href="mailto:geirm@optonline.net">Geir Magnusson Jr.</a>
* @version $Id$
- */
+ */
public class VMReferenceMungeVisitor extends BaseVisitor
{
/**
@@ -39,7 +39,7 @@
/**
* CTOR - takes a map of args to reference
- * @param map
+ * @param map
*/
public VMReferenceMungeVisitor( Map map )
{
@@ -73,7 +73,7 @@
/*
* feed the children...
*/
- data = node.childrenAccept(this, data);
+ data = node.childrenAccept(this, data);
return data;
}
Modified: jakarta/velocity/engine/trunk/src/java/org/apache/velocity/servlet/VelocityServlet.java
URL: http://svn.apache.org/viewvc/jakarta/velocity/engine/trunk/src/java/org/apache/velocity/servlet/VelocityServlet.java?view=diff&rev=447969&r1=447968&r2=447969
==============================================================================
--- jakarta/velocity/engine/trunk/src/java/org/apache/velocity/servlet/VelocityServlet.java (original)
+++ jakarta/velocity/engine/trunk/src/java/org/apache/velocity/servlet/VelocityServlet.java Tue Sep 19 14:00:14 2006
@@ -46,10 +46,10 @@
/**
* Base class which simplifies the use of Velocity with Servlets.
- * Extend this class, implement the <code>handleRequest()</code> method,
- * and add your data to the context. Then call
+ * Extend this class, implement the <code>handleRequest()</code> method,
+ * and add your data to the context. Then call
* <code>getTemplate("myTemplate.wm")</code>.
- *
+ *
* This class puts some things into the context object that you should
* be aware of:
* <pre>
@@ -65,7 +65,7 @@
* <li> createContext() : for creating and loading the Context
* <li> setContentType() : for changing the content type on a request
* by request basis
- * <li> handleRequest() : you <b>must</b> implement this
+ * <li> handleRequest() : you <b>must</b> implement this
* <li> mergeTemplate() : the template rendering process
* <li> requestCleanup() : post rendering resource or other cleanup
* <li> error() : error handling
@@ -108,8 +108,8 @@
* The default content type for the response
*/
public static final String DEFAULT_CONTENT_TYPE = "text/html";
-
-
+
+
/**
* Encoding for the output stream
*/
@@ -137,11 +137,11 @@
/**
* Cache of writers
*/
-
+
private static SimplePool writerPool = new SimplePool(40);
- /**
- * Performs initialization of this servlet. Called by the servlet
+ /**
+ * Performs initialization of this servlet. Called by the servlet
* container on loading.
*
* @param config The servlet configuration to apply.
@@ -161,20 +161,20 @@
/*
* Now that Velocity is initialized, cache some config.
*/
- VelocityServlet.defaultContentType =
+ VelocityServlet.defaultContentType =
RuntimeSingleton.getString(CONTENT_TYPE, DEFAULT_CONTENT_TYPE);
}
/**
- * Initializes the Velocity runtime, first calling
- * loadConfiguration(ServletConvig) to get a
+ * Initializes the Velocity runtime, first calling
+ * loadConfiguration(ServletConvig) to get a
* java.util.Properties of configuration information
* and then calling Velocity.init(). Override this
- * to do anything to the environment before the
- * initialization of the singelton takes place, or to
+ * to do anything to the environment before the
+ * initialization of the singelton takes place, or to
* initialize the singleton in other ways.
- * @param config
- * @throws ServletException
+ * @param config
+ * @throws ServletException
*/
protected void initVelocity( ServletConfig config )
throws ServletException
@@ -182,24 +182,24 @@
try
{
/*
- * call the overridable method to allow the
+ * call the overridable method to allow the
* derived classes a shot at altering the configuration
* before initializing Runtime
*/
Properties props = loadConfiguration( config );
-
+
Velocity.init( props );
}
catch( Exception e )
{
throw new ServletException("Error initializing Velocity: " + e, e);
- }
- }
-
+ }
+ }
+
/**
- * Loads the configuration information and returns that
- * information as a Properties, which will be used to
+ * Loads the configuration information and returns that
+ * information as a Properties, which will be used to
* initialize the Velocity runtime.
* <br><br>
* Currently, this method gets the initialization parameter
@@ -230,7 +230,7 @@
* <description> Path to Velocity configuration </description>
* </context-param>
* </pre>
- *
+ *
* Derived classes may do the same, or take advantage of this code to do the loading for them via :
* <pre>
* Properties p = super.loadConfiguration( config );
@@ -280,7 +280,7 @@
INIT_PROPS_KEY + '\'');
}
}
-
+
/*
* This will attempt to find the location of the properties
* file from the relative path to the WAR archive (ie:
@@ -292,7 +292,7 @@
*/
Properties p = new Properties();
-
+
if ( propsFile != null )
{
p.load(getServletContext().getResourceAsStream(propsFile));
@@ -300,14 +300,14 @@
return p;
}
-
+
/**
* Handles HTTP <code>GET</code> requests by calling {@link
* #doRequest(HttpServletRequest, HttpServletResponse)}.
- * @param request
- * @param response
- * @throws ServletException
- * @throws IOException
+ * @param request
+ * @param response
+ * @throws ServletException
+ * @throws IOException
*/
public void doGet( HttpServletRequest request, HttpServletResponse response )
throws ServletException, IOException
@@ -318,10 +318,10 @@
/**
* Handles HTTP <code>POST</code> requests by calling {@link
* #doRequest(HttpServletRequest, HttpServletResponse)}.
- * @param request
- * @param response
- * @throws ServletException
- * @throws IOException
+ * @param request
+ * @param response
+ * @throws ServletException
+ * @throws IOException
*/
public void doPost( HttpServletRequest request, HttpServletResponse response )
throws ServletException, IOException
@@ -334,8 +334,8 @@
*
* @param request HttpServletRequest object containing client request
* @param response HttpServletResponse object for the response
- * @throws ServletException
- * @throws IOException
+ * @throws ServletException
+ * @throws IOException
*/
protected void doRequest(HttpServletRequest request, HttpServletResponse response )
throws ServletException, IOException
@@ -348,9 +348,9 @@
*/
context = createContext( request, response );
-
+
/*
- * set the content type
+ * set the content type
*/
setContentType( request, response );
@@ -359,7 +359,7 @@
* let someone handle the request
*/
- Template template = handleRequest( request, response, context );
+ Template template = handleRequest( request, response, context );
/*
* bail if we can't find the template
*/
@@ -400,8 +400,8 @@
* processing sequence, allowing a derived class to do resource
* cleanup or other end of process cycle tasks.
*
- * @param request servlet request from client
- * @param response servlet reponse
+ * @param request servlet request from client
+ * @param response servlet reponse
* @param context context created by the createContext() method
*/
protected void requestCleanup( HttpServletRequest request, HttpServletResponse response, Context context )
@@ -416,26 +416,26 @@
* @param template template object returned by the handleRequest() method
* @param context context created by the createContext() method
* @param response servlet reponse (use this to get the output stream or Writer
- * @throws ResourceNotFoundException
- * @throws ParseErrorException
- * @throws MethodInvocationException
- * @throws IOException
- * @throws UnsupportedEncodingException
- * @throws Exception
+ * @throws ResourceNotFoundException
+ * @throws ParseErrorException
+ * @throws MethodInvocationException
+ * @throws IOException
+ * @throws UnsupportedEncodingException
+ * @throws Exception
*/
protected void mergeTemplate( Template template, Context context, HttpServletResponse response )
- throws ResourceNotFoundException, ParseErrorException,
+ throws ResourceNotFoundException, ParseErrorException,
MethodInvocationException, IOException, UnsupportedEncodingException, Exception
{
ServletOutputStream output = response.getOutputStream();
VelocityWriter vw = null;
// ASSUMPTION: response.setContentType() has been called.
String encoding = response.getCharacterEncoding();
-
+
try
{
vw = (VelocityWriter) writerPool.get();
-
+
if (vw == null)
{
vw = new VelocityWriter(new OutputStreamWriter(output,
@@ -446,7 +446,7 @@
{
vw.recycle(new OutputStreamWriter(output, encoding));
}
-
+
template.merge(context, vw);
}
finally
@@ -547,13 +547,13 @@
*/
VelocityContext context = new VelocityContext();
-
+
/*
* put the request/response objects into the context
* wrap the HttpServletRequest to solve the introspection
- * problems
+ * problems
*/
-
+
context.put( REQUEST, request );
context.put( RESPONSE, response );
@@ -563,7 +563,7 @@
/**
* Retrieves the requested template.
*
- * @param name The file name of the template to retrieve relative to the
+ * @param name The file name of the template to retrieve relative to the
* template root.
* @return The requested template.
* @throws ResourceNotFoundException if template not found
@@ -577,12 +577,12 @@
{
return RuntimeSingleton.getTemplate(name);
}
-
+
/**
* Retrieves the requested template with the specified
* character encoding.
*
- * @param name The file name of the template to retrieve relative to the
+ * @param name The file name of the template to retrieve relative to the
* template root.
* @param encoding the character encoding of the template
*
@@ -592,7 +592,7 @@
* @throws ParseErrorException if template cannot be parsed due
* to syntax (or other) error.
* @throws Exception if an error occurs in template initialization
- *
+ *
* @since Velocity v1.1
*/
public Template getTemplate( String name, String encoding )
@@ -602,24 +602,24 @@
}
/**
- * Implement this method to add your application data to the context,
- * calling the <code>getTemplate()</code> method to produce your return
+ * Implement this method to add your application data to the context,
+ * calling the <code>getTemplate()</code> method to produce your return
* value.
* <br><br>
* In the event of a problem, you may handle the request directly
* and return <code>null</code> or throw a more meaningful exception
* for the error handler to catch.
*
- * @param request servlet request from client
- * @param response servlet reponse
+ * @param request servlet request from client
+ * @param response servlet reponse
* @param ctx The context to add your data to.
* @return The template to merge with your context or null, indicating
* that you handled the processing.
- * @throws Exception
+ * @throws Exception
*
* @since Velocity v1.1
*/
- protected Template handleRequest( HttpServletRequest request, HttpServletResponse response, Context ctx )
+ protected Template handleRequest( HttpServletRequest request, HttpServletResponse response, Context ctx )
throws Exception
{
/*
@@ -629,8 +629,8 @@
Template t = handleRequest( ctx );
/*
- * if it returns null, this is the 'old' deprecated
- * way, and we want to mimic the behavior for a little
+ * if it returns null, this is the 'old' deprecated
+ * way, and we want to mimic the behavior for a little
* while anyway
*/
@@ -643,39 +643,39 @@
}
/**
- * Implement this method to add your application data to the context,
- * calling the <code>getTemplate()</code> method to produce your return
+ * Implement this method to add your application data to the context,
+ * calling the <code>getTemplate()</code> method to produce your return
* value.
* <br><br>
* In the event of a problem, you may simple return <code>null</code>
* or throw a more meaningful exception.
*
* @deprecated Use
- * {@link #handleRequest( HttpServletRequest request,
+ * {@link #handleRequest( HttpServletRequest request,
* HttpServletResponse response, Context ctx )}
*
* @param ctx The context to add your data to.
* @return The template to merge with your context.
- * @throws Exception
+ * @throws Exception
*/
- protected Template handleRequest( Context ctx )
+ protected Template handleRequest( Context ctx )
throws Exception
{
throw new Exception ("You must override VelocityServlet.handleRequest( Context) "
+ " or VelocityServlet.handleRequest( HttpServletRequest, "
+ " HttpServletResponse, Context)" );
}
-
+
/**
* Invoked when there is an error thrown in any part of doRequest() processing.
* <br><br>
* Default will send a simple HTML response indicating there was a problem.
- *
+ *
* @param request original HttpServletRequest from servlet container.
* @param response HttpServletResponse object from servlet container.
* @param cause Exception that was thrown by some other part of process.
- * @throws ServletException
- * @throws IOException
+ * @throws ServletException
+ * @throws IOException
*/
protected void error( HttpServletRequest request, HttpServletResponse response, Exception cause )
throws ServletException, IOException
Modified: jakarta/velocity/engine/trunk/src/java/org/apache/velocity/texen/Generator.java
URL: http://svn.apache.org/viewvc/jakarta/velocity/engine/trunk/src/java/org/apache/velocity/texen/Generator.java?view=diff&rev=447969&r1=447968&r2=447969
==============================================================================
--- jakarta/velocity/engine/trunk/src/java/org/apache/velocity/texen/Generator.java (original)
+++ jakarta/velocity/engine/trunk/src/java/org/apache/velocity/texen/Generator.java Tue Sep 19 14:00:14 2006
@@ -127,7 +127,7 @@
/**
* Set the velocity engine.
- * @param ve
+ * @param ve
*/
public void setVelocityEngine(VelocityEngine ve)
{
@@ -237,7 +237,7 @@
/**
* Set the output path for the generated
* output.
- * @param outputPath
+ * @param outputPath
*/
public void setOutputPath(String outputPath)
{
@@ -257,7 +257,7 @@
/**
* Set the output encoding.
- * @param outputEncoding
+ * @param outputEncoding
*/
public void setOutputEncoding(String outputEncoding)
{
@@ -266,7 +266,7 @@
/**
* Set the input (template) encoding.
- * @param inputEncoding
+ * @param inputEncoding
*/
public void setInputEncoding(String inputEncoding)
{
@@ -279,7 +279,7 @@
* @param path path to the output file
* @param encoding output encoding
* @return A Writer for this generator.
- * @throws Exception
+ * @throws Exception
*/
public Writer getWriter(String path, String encoding) throws Exception {
Writer writer;
@@ -299,7 +299,7 @@
* @param templateName name of the template
* @param encoding template encoding
* @return A Template.
- * @throws Exception
+ * @throws Exception
*/
public Template getTemplate(String templateName, String encoding) throws Exception {
Template template;
@@ -320,7 +320,7 @@
* @param inputTemplate input template
* @param outputFile output file
* @return The parsed file.
- * @throws Exception
+ * @throws Exception
*/
public String parse (String inputTemplate, String outputFile)
throws Exception
@@ -339,7 +339,7 @@
* @param objectID id for object to be placed in the control context
* @param object object to be placed in the context
* @return String generated output from velocity
- * @throws Exception
+ * @throws Exception
*/
public String parse (String inputTemplate,
String outputFile,
@@ -362,7 +362,7 @@
* @param objectID id for object to be placed in the control context
* @param object object to be placed in the context
* @return String generated output from velocity
- * @throws Exception
+ * @throws Exception
*/
public String parse (String inputTemplate,
String inputEncoding,
@@ -428,7 +428,7 @@
* @param controlTemplate control template
* @param controlContext control context
* @return String generated output
- * @throws Exception
+ * @throws Exception
*/
public String parse (String controlTemplate, Context controlContext)
throws Exception
Modified: jakarta/velocity/engine/trunk/src/java/org/apache/velocity/texen/ant/TexenTask.java
URL: http://svn.apache.org/viewvc/jakarta/velocity/engine/trunk/src/java/org/apache/velocity/texen/ant/TexenTask.java?view=diff&rev=447969&r1=447968&r2=447969
==============================================================================
--- jakarta/velocity/engine/trunk/src/java/org/apache/velocity/texen/ant/TexenTask.java (original)
+++ jakarta/velocity/engine/trunk/src/java/org/apache/velocity/texen/ant/TexenTask.java Tue Sep 19 14:00:14 2006
@@ -137,8 +137,8 @@
/**
* The LogFile (incl. path) to log to.
*/
- protected String logFile;
-
+ protected String logFile;
+
/**
* Property which controls whether the resource
* loader will be told to cache. Default false
@@ -146,14 +146,14 @@
protected String useResourceLoaderCache = "false";
/**
- *
+ *
*/
protected String resourceLoaderModificationCheckInterval = "2";
/**
* [REQUIRED] Set the control template for the
* generating process.
- * @param controlTemplate
+ * @param controlTemplate
*/
public void setControlTemplate (String controlTemplate)
{
@@ -174,8 +174,8 @@
* [REQUIRED] Set the path where Velocity will look
* for templates using the file template
* loader.
- * @param templatePath
- * @throws Exception
+ * @param templatePath
+ * @throws Exception
*/
public void setTemplatePath(String templatePath) throws Exception
@@ -212,7 +212,7 @@
/**
* [REQUIRED] Set the output directory. It will be
* created if it doesn't exist.
- * @param outputDirectory
+ * @param outputDirectory
*/
public void setOutputDirectory(File outputDirectory)
{
@@ -238,7 +238,7 @@
/**
* [REQUIRED] Set the output file for the
* generation process.
- * @param outputFile
+ * @param outputFile
*/
public void setOutputFile(String outputFile)
{
@@ -247,7 +247,7 @@
/**
* Set the output encoding.
- * @param outputEncoding
+ * @param outputEncoding
*/
public void setOutputEncoding(String outputEncoding)
{
@@ -256,7 +256,7 @@
/**
* Set the input (template) encoding.
- * @param inputEncoding
+ * @param inputEncoding
*/
public void setInputEncoding(String inputEncoding)
{
@@ -275,13 +275,13 @@
/**
* Sets the log file.
- * @param log
+ * @param log
*/
public void setLogFile(String log)
{
this.logFile = log;
}
-
+
/**
* Gets the log file.
* @return The log file.
@@ -290,12 +290,12 @@
{
return this.logFile;
}
-
+
/**
* Set the context properties that will be
* fed into the initial context be the
* generating process starts.
- * @param file
+ * @param file
*/
public void setContextProperties( String file )
{
@@ -475,8 +475,8 @@
if (this.logFile != null)
{
ve.setProperty(RuntimeConstants.RUNTIME_LOG, this.logFile);
- }
-
+ }
+
ve.init();
// Create the text generator.
Modified: jakarta/velocity/engine/trunk/src/java/org/apache/velocity/texen/util/FileUtil.java
URL: http://svn.apache.org/viewvc/jakarta/velocity/engine/trunk/src/java/org/apache/velocity/texen/util/FileUtil.java?view=diff&rev=447969&r1=447968&r2=447969
==============================================================================
--- jakarta/velocity/engine/trunk/src/java/org/apache/velocity/texen/util/FileUtil.java (original)
+++ jakarta/velocity/engine/trunk/src/java/org/apache/velocity/texen/util/FileUtil.java Tue Sep 19 14:00:14 2006
@@ -23,7 +23,7 @@
*
* @author <a href="mailto:leon@opticode.co.za">Leon Messerschmidt</a>
* @author <a href="mailto:jvanzyl@apache.org">Jason van Zyl</a>
- * @version $Id$
+ * @version $Id$
*/
public class FileUtil
{
@@ -59,7 +59,7 @@
File f = new File(s);
return f;
}
-
+
/**
* A method to get a File object.
*
Modified: jakarta/velocity/engine/trunk/src/java/org/apache/velocity/texen/util/PropertiesUtil.java
URL: http://svn.apache.org/viewvc/jakarta/velocity/engine/trunk/src/java/org/apache/velocity/texen/util/PropertiesUtil.java?view=diff&rev=447969&r1=447968&r2=447969
==============================================================================
--- jakarta/velocity/engine/trunk/src/java/org/apache/velocity/texen/util/PropertiesUtil.java (original)
+++ jakarta/velocity/engine/trunk/src/java/org/apache/velocity/texen/util/PropertiesUtil.java Tue Sep 19 14:00:14 2006
@@ -29,7 +29,7 @@
*
* @author <a href="mailto:leon@opticode.co.za">Leon Messerschmidt</a>
* @author <a href="mailto:sbailliez@apache.org">Stephane Bailliez</a>
- * @version $Id$
+ * @version $Id$
*/
public class PropertiesUtil
{
@@ -66,10 +66,10 @@
{
throw new RuntimeException("Could not load properties: " + e.getMessage());
}
-
+
return properties;
}
-
+
/**
* Load a properties file from the templatePath defined in the
* generator. As the templatePath can contains multiple paths,
@@ -82,14 +82,14 @@
* a relative pathname.
* @return a properties instance loaded with the properties from
* the file. If no file can be found it returns an empty instance.
- * @throws Exception
+ * @throws Exception
*/
protected Properties loadFromTemplatePath(final String propertiesFile)
throws Exception
{
Properties properties = new Properties();
String templatePath = Generator.getInstance().getTemplatePath();
-
+
// We might have something like the following:
//
// #set ($dbprops = $properties.load("$generator.templatePath/path/props")
@@ -115,13 +115,13 @@
// path and they are simply using:
//
// #set ($dbprops = $properties.load("props") (1)
- //
+ //
// than we have to tack on the templatePath in order
// for the properties file to be found. We want (1)
// to work whether the generation is being run from
// the file system or from a JAR file.
String fullPath = propertiesFile;
-
+
// FIXME probably not that clever since there could be
// a mix of file separators and the test will fail :-(
if (!fullPath.startsWith(templateDir))
@@ -142,7 +142,7 @@
stream.close();
}
}
- }
+ }
return properties;
}
@@ -152,14 +152,14 @@
* @param propertiesName the properties file to load.
* @return a properties instance loaded with the properties from
* the file. If no file can be found it returns an empty instance.
- * @throws Exception
- */
+ * @throws Exception
+ */
protected Properties loadFromClassPath(final String propertiesName)
throws Exception
{
Properties properties = new Properties();
ClassLoader classLoader = this.getClass().getClassLoader();
-
+
InputStream inputStream = null;
try
@@ -171,11 +171,11 @@
// and this hack will allow those same templates
// that use $generator.templatePath to work in
// JAR files.
-
+
String propertiesFile = propertiesName.startsWith("$generator")
? propertiesName.substring("$generator.templatePath/".length())
: propertiesName;
-
+
inputStream = classLoader.getResourceAsStream(propertiesFile);
properties.load(inputStream);
}
Modified: jakarta/velocity/engine/trunk/src/java/org/apache/velocity/util/ArrayIterator.java
URL: http://svn.apache.org/viewvc/jakarta/velocity/engine/trunk/src/java/org/apache/velocity/util/ArrayIterator.java?view=diff&rev=447969&r1=447968&r2=447969
==============================================================================
--- jakarta/velocity/engine/trunk/src/java/org/apache/velocity/util/ArrayIterator.java (original)
+++ jakarta/velocity/engine/trunk/src/java/org/apache/velocity/util/ArrayIterator.java Tue Sep 19 14:00:14 2006
@@ -60,17 +60,17 @@
public ArrayIterator(Object array)
{
/*
- * if this isn't an array, then throw. Note that this is
+ * if this isn't an array, then throw. Note that this is
* for internal use - so this should never happen - if it does
* we screwed up.
*/
-
+
if ( !array.getClass().isArray() )
- {
- throw new IllegalArgumentException(
+ {
+ throw new IllegalArgumentException(
"Programmer error : internal ArrayIterator invoked w/o array");
}
-
+
this.array = array;
pos = 0;
size = Array.getLength( this.array );
@@ -85,15 +85,15 @@
{
if (pos < size )
return Array.get( array, pos++);
-
+
/*
* we screwed up...
*/
-
+
throw new NoSuchElementException("No more elements: " + pos +
" / " + size);
}
-
+
/**
* Check to see if there is another element in the array.
*
Modified: jakarta/velocity/engine/trunk/src/java/org/apache/velocity/util/ClassUtils.java
URL: http://svn.apache.org/viewvc/jakarta/velocity/engine/trunk/src/java/org/apache/velocity/util/ClassUtils.java?view=diff&rev=447969&r1=447968&r2=447969
==============================================================================
--- jakarta/velocity/engine/trunk/src/java/org/apache/velocity/util/ClassUtils.java (original)
+++ jakarta/velocity/engine/trunk/src/java/org/apache/velocity/util/ClassUtils.java Tue Sep 19 14:00:14 2006
@@ -21,7 +21,7 @@
/**
* Simple utility functions for manipulating classes and resources
- * from the classloader.
+ * from the classloader.
*
* @author <a href="mailto:wglass@apache.org">Will Glass-Husain</a>
* @version $Id$
@@ -31,20 +31,20 @@
/**
* Utility class; cannot be instantiated.
*/
- private ClassUtils()
+ private ClassUtils()
{
}
-
+
/**
* Return the specified class. Checks the ThreadContext classloader first,
- * then uses the System classloader. Should replace all calls to
+ * then uses the System classloader. Should replace all calls to
* <code>Class.forName( claz )</code> (which only calls the System class
- * loader) when the class might be in a different classloader (e.g. in a
+ * loader) when the class might be in a different classloader (e.g. in a
* webapp).
*
* @param clazz the name of the class to instantiate
* @return the requested Class object
- * @throws ClassNotFoundException
+ * @throws ClassNotFoundException
*/
public static Class getClass(String clazz) throws ClassNotFoundException
{
@@ -52,12 +52,12 @@
* Use the Thread context classloader if possible
*/
ClassLoader loader = Thread.currentThread().getContextClassLoader();
- if (loader != null)
+ if (loader != null)
{
- try
+ try
{
return Class.forName(clazz, true, loader);
- }
+ }
catch (ClassNotFoundException E)
{
/**
@@ -71,66 +71,66 @@
*/
return Class.forName(clazz);
}
-
+
/**
* Return a new instance of the given class. Checks the ThreadContext
* classloader first, then uses the System classloader. Should replace all
- * calls to <code>Class.forName( claz ).newInstance()</code> (which only
- * calls the System class loader) when the class might be in a different
+ * calls to <code>Class.forName( claz ).newInstance()</code> (which only
+ * calls the System class loader) when the class might be in a different
* classloader (e.g. in a webapp).
*
* @param clazz the name of the class to instantiate
* @return an instance of the specified class
- * @throws ClassNotFoundException
- * @throws IllegalAccessException
- * @throws InstantiationException
+ * @throws ClassNotFoundException
+ * @throws IllegalAccessException
+ * @throws InstantiationException
*/
- public static Object getNewInstance(String clazz)
+ public static Object getNewInstance(String clazz)
throws ClassNotFoundException,IllegalAccessException,InstantiationException
{
return getClass(clazz).newInstance();
}
-
+
/**
* Finds a resource with the given name. Checks the Thread Context
- * classloader, then uses the System classloader. Should replace all
+ * classloader, then uses the System classloader. Should replace all
* calls to <code>Class.getResourceAsString</code> when the resource
* might come from a different classloader. (e.g. a webapp).
* @param claz Class to use when getting the System classloader (used if no Thread
- * Context classloader available or fails to get resource).
+ * Context classloader available or fails to get resource).
* @param name name of the resource
* @return InputStream for the resource.
*/
public static InputStream getResourceAsStream(Class claz, String name)
{
InputStream result = null;
-
+
/**
* remove leading slash so path will work with classes in a JAR file
- */
+ */
while (name.startsWith("/"))
{
name = name.substring(1);
}
-
+
ClassLoader classLoader = Thread.currentThread()
.getContextClassLoader();
- if (classLoader == null)
+ if (classLoader == null)
{
classLoader = claz.getClassLoader();
result = classLoader.getResourceAsStream( name );
- }
- else
+ }
+ else
{
result= classLoader.getResourceAsStream( name );
-
+
/**
- * for compatibility with texen / ant tasks, fall back to
+ * for compatibility with texen / ant tasks, fall back to
* old method when resource is not found.
*/
-
- if (result == null)
+
+ if (result == null)
{
classLoader = claz.getClassLoader();
if (classLoader != null)
Modified: jakarta/velocity/engine/trunk/src/java/org/apache/velocity/util/EnumerationIterator.java
URL: http://svn.apache.org/viewvc/jakarta/velocity/engine/trunk/src/java/org/apache/velocity/util/EnumerationIterator.java?view=diff&rev=447969&r1=447968&r2=447969
==============================================================================
--- jakarta/velocity/engine/trunk/src/java/org/apache/velocity/util/EnumerationIterator.java (original)
+++ jakarta/velocity/engine/trunk/src/java/org/apache/velocity/util/EnumerationIterator.java Tue Sep 19 14:00:14 2006
@@ -33,7 +33,7 @@
private Enumeration enumeration = null;
/**
- * Creates a new iteratorwrapper instance for the specified
+ * Creates a new iteratorwrapper instance for the specified
* Enumeration.
*
* @param enumeration The Enumeration to wrap.
@@ -52,7 +52,7 @@
{
return enumeration.nextElement();
}
-
+
/**
* Check to see if there is another element in the array.
*
@@ -70,5 +70,5 @@
{
// not implemented
}
-
+
}
Modified: jakarta/velocity/engine/trunk/src/java/org/apache/velocity/util/ExceptionUtils.java
URL: http://svn.apache.org/viewvc/jakarta/velocity/engine/trunk/src/java/org/apache/velocity/util/ExceptionUtils.java?view=diff&rev=447969&r1=447968&r2=447969
==============================================================================
--- jakarta/velocity/engine/trunk/src/java/org/apache/velocity/util/ExceptionUtils.java (original)
+++ jakarta/velocity/engine/trunk/src/java/org/apache/velocity/util/ExceptionUtils.java Tue Sep 19 14:00:14 2006
@@ -31,8 +31,8 @@
/**
* Create a new RuntimeException, setting the cause if possible.
- * @param message
- * @param cause
+ * @param message
+ * @param cause
* @return A runtime exception object.
*/
public static RuntimeException createRuntimeException(
@@ -44,9 +44,9 @@
/**
* Create a new Exception, setting the cause if possible.
- * @param clazz
- * @param message
- * @param cause
+ * @param clazz
+ * @param message
+ * @param cause
* @return A Throwable.
*/
public static Throwable createWithCause(Class clazz,
@@ -96,8 +96,8 @@
/**
* Set the cause of the Exception. Will detect if this is not allowed.
- * @param onObject
- * @param cause
+ * @param onObject
+ * @param cause
*/
public static void setCause(Throwable onObject, Throwable cause)
{
Modified: jakarta/velocity/engine/trunk/src/java/org/apache/velocity/util/SimplePool.java
URL: http://svn.apache.org/viewvc/jakarta/velocity/engine/trunk/src/java/org/apache/velocity/util/SimplePool.java?view=diff&rev=447969&r1=447968&r2=447969
==============================================================================
--- jakarta/velocity/engine/trunk/src/java/org/apache/velocity/util/SimplePool.java (original)
+++ jakarta/velocity/engine/trunk/src/java/org/apache/velocity/util/SimplePool.java Tue Sep 19 14:00:14 2006
@@ -57,7 +57,7 @@
/**
* Add the object to the pool, silent nothing if the pool is full
- * @param o
+ * @param o
*/
public void put(Object o)
{
@@ -114,9 +114,9 @@
return null;
}
- /**
+ /**
* Return the size of the pool
- * @return The pool size.
+ * @return The pool size.
*/
public int getMax()
{
Modified: jakarta/velocity/engine/trunk/src/java/org/apache/velocity/util/StringUtils.java
URL: http://svn.apache.org/viewvc/jakarta/velocity/engine/trunk/src/java/org/apache/velocity/util/StringUtils.java?view=diff&rev=447969&r1=447968&r2=447969
==============================================================================
--- jakarta/velocity/engine/trunk/src/java/org/apache/velocity/util/StringUtils.java (original)
+++ jakarta/velocity/engine/trunk/src/java/org/apache/velocity/util/StringUtils.java Tue Sep 19 14:00:14 2006
@@ -44,7 +44,7 @@
* Line separator for the OS we are operating on.
*/
private static final String EOL = System.getProperty("line.separator");
-
+
/**
* Concatenates a list of objects as a String.
*
@@ -77,16 +77,16 @@
/**
* <p>
* Remove underscores from a string and replaces first
- * letters with capitals. Other letters are changed to lower case.
+ * letters with capitals. Other letters are changed to lower case.
* </p>
*
- * <p>
+ * <p>
* For example <code>foo_bar</code> becomes <code>FooBar</code>
* but <code>foo_barBar</code> becomes <code>FooBarbar</code>.
* </p>
*
* @param data string to remove underscores from.
- * @return String
+ * @return String
* @deprecated Use the org.apache.commons.util.StringUtils class
* instead. Using its firstLetterCaps() method in conjunction
* with a StringTokenizer will achieve the same result.
@@ -98,7 +98,7 @@
temp = data;
StringTokenizer st = new StringTokenizer(temp, "_");
-
+
while (st.hasMoreTokens())
{
String element = (String) st.nextElement();
@@ -109,21 +109,21 @@
}
/**
- * <p>
+ * <p>
* 'Camels Hump' replacement of underscores.
* </p>
*
- * <p>
+ * <p>
* Remove underscores from a string but leave the capitalization of the
* other letters unchanged.
* </p>
*
- * <p>
+ * <p>
* For example <code>foo_barBar</code> becomes <code>FooBarBar</code>.
* </p>
*
* @param data string to hump
- * @return String
+ * @return String
*/
static public String removeAndHump (String data)
{
@@ -135,7 +135,7 @@
* 'Camels Hump' replacement.
* </p>
*
- * <p>
+ * <p>
* Remove one string from another string but leave the capitalization of the
* other letters unchanged.
* </p>
@@ -146,7 +146,7 @@
*
* @param data string to hump
* @param replaceThis string to be replaced
- * @return String
+ * @return String
*/
static public String removeAndHump (String data,String replaceThis)
{
@@ -155,22 +155,22 @@
temp = data;
StringTokenizer st = new StringTokenizer(temp, replaceThis);
-
+
while (st.hasMoreTokens())
{
String element = (String) st.nextElement();
out.append ( capitalizeFirstLetter(element));
}//while
-
+
return out.toString();
}
/**
- * <p>
+ * <p>
* Makes the first letter caps and the rest lowercase.
* </p>
*
- * <p>
+ * <p>
* For example <code>fooBar</code> becomes <code>Foobar</code>.
* </p>
*
@@ -185,11 +185,11 @@
}
/**
- * <p>
- * Capitalize the first letter but leave the rest as they are.
+ * <p>
+ * Capitalize the first letter but leave the rest as they are.
* </p>
*
- * <p>
+ * <p>
* For example <code>fooBar</code> becomes <code>FooBar</code>.
* </p>
*
@@ -223,9 +223,9 @@
/**
* Chop i characters off the end of a string.
- * This method assumes that any EOL characters in String s
+ * This method assumes that any EOL characters in String s
* and the platform EOL will be the same.
- * A 2 character EOL will count as 1 character.
+ * A 2 character EOL will count as 1 character.
*
* @param s String to chop.
* @param i Number of characters to chop.
@@ -237,8 +237,8 @@
}
/**
- * Chop i characters off the end of a string.
- * A 2 character EOL will count as 1 character.
+ * Chop i characters off the end of a string.
+ * A 2 character EOL will count as 1 character.
*
* @param s String to chop.
* @param i Number of characters to chop.
@@ -341,7 +341,7 @@
return argBuf;
}
-
+
/**
* Read the contents of a file and place them in
* a string object.
@@ -352,12 +352,12 @@
public static String fileContentsToString(String file)
{
String contents = "";
-
+
File f = null;
try
{
f = new File(file);
-
+
if (f.exists())
{
FileReader fr = null;
@@ -387,7 +387,7 @@
}
return contents;
}
-
+
/**
* Remove/collapse multiple newline characters.
*
@@ -469,7 +469,7 @@
}
return line;
}
-
+
/**
* Returns the output of printStackTrace as a String.
*
@@ -516,7 +516,7 @@
{
normalized = "/" + normalized;
}
-
+
// Resolve occurrences of "//" in the normalized path
while (true)
{
@@ -568,7 +568,7 @@
* If state is true then return the trueString, else
* return the falseString.
*
- * @param state
+ * @param state
* @param trueString
* @param falseString
* @return Selected result.
@@ -578,12 +578,12 @@
if (state)
{
return trueString;
- }
+ }
else
{
return falseString;
- }
- }
+ }
+ }
/**
* Check to see if all the string objects passed
@@ -595,17 +595,17 @@
public boolean allEmpty(List list)
{
int size = list.size();
-
+
for (int i = 0; i < size; i++)
{
if (list.get(i) != null && list.get(i).toString().length() > 0)
{
return false;
}
- }
+ }
return true;
}
-
+
/**
* Trim all strings in a List. Changes the strings in the existing list.
* @param list
@@ -615,13 +615,13 @@
{
if (list == null)
return null;
-
+
int sz = list.size();
for (int i = 0; i < sz; i++)
list.set(i,nullTrim((String) list.get(i)));
return list;
}
-
+
/**
* Trim the string, but pass a null through.
* @param s
Modified: jakarta/velocity/engine/trunk/src/java/org/apache/velocity/util/introspection/ClassMap.java
URL: http://svn.apache.org/viewvc/jakarta/velocity/engine/trunk/src/java/org/apache/velocity/util/introspection/ClassMap.java?view=diff&rev=447969&r1=447968&r2=447969
==============================================================================
--- jakarta/velocity/engine/trunk/src/java/org/apache/velocity/util/introspection/ClassMap.java (original)
+++ jakarta/velocity/engine/trunk/src/java/org/apache/velocity/util/introspection/ClassMap.java Tue Sep 19 14:00:14 2006
@@ -38,7 +38,7 @@
private static final CacheMiss CACHE_MISS = new CacheMiss();
private static final Object OBJECT = new Object();
- /**
+ /**
* Class passed into the constructor used to as
* the basis for the Method map.
*/
@@ -55,7 +55,7 @@
/**
* Standard constructor
- * @param clazz
+ * @param clazz
*/
public ClassMap( Class clazz)
{
@@ -74,7 +74,7 @@
{
return clazz;
}
-
+
/**
* Find a Method using the methodKey
* provided.
@@ -86,10 +86,10 @@
*
* If nothing is found, then we must actually go
* and introspect the method from the MethodMap.
- * @param name
- * @param params
+ * @param name
+ * @param params
* @return Method object.
- * @throws MethodMap.AmbiguousException
+ * @throws MethodMap.AmbiguousException
*/
public Method findMethod(String name, Object[] params)
throws MethodMap.AmbiguousException
@@ -134,10 +134,10 @@
}
// Yes, this might just be null.
-
+
return (Method) cacheEntry;
}
-
+
/**
* Populate the Map of direct hits. These
* are taken from all the public methods
@@ -160,7 +160,7 @@
Method method = methods[i];
/*
- * now get the 'public method', the method declared by a
+ * now get the 'public method', the method declared by a
* public interface or class. (because the actual implementing
* class may be a facade...
*/
@@ -179,7 +179,7 @@
methodMap.add( publicMethod );
methodCache.put( makeMethodKey( publicMethod), publicMethod);
}
- }
+ }
}
/**
@@ -190,14 +190,14 @@
private String makeMethodKey(Method method)
{
Class[] parameterTypes = method.getParameterTypes();
-
+
StringBuffer methodKey = new StringBuffer(method.getName());
-
+
for (int j = 0; j < parameterTypes.length; j++)
{
/*
* If the argument type is primitive then we want
- * to convert our primitive type signature to the
+ * to convert our primitive type signature to the
* corresponding Object type so introspection for
* methods with primitive types will work correctly.
*/
@@ -219,13 +219,13 @@
methodKey.append("java.lang.Long");
else if (parameterTypes[j].equals(Short.TYPE))
methodKey.append("java.lang.Short");
- }
+ }
else
{
methodKey.append(parameterTypes[j].getName());
}
- }
-
+ }
+
return methodKey.toString();
}
@@ -244,7 +244,7 @@
methodKey.append(arg.getClass().getName());
}
-
+
return methodKey.toString();
}
@@ -257,12 +257,12 @@
private static Method[] getAccessibleMethods(Class clazz)
{
Method[] methods = clazz.getMethods();
-
+
/*
* Short circuit for the (hopefully) majority of cases where the
* clazz is public
*/
-
+
if (Modifier.isPublic(clazz.getModifiers()))
{
return methods;
@@ -314,7 +314,7 @@
private static int getAccessibleMethods( Class clazz, MethodInfo[] methodInfos, int upcastCount)
{
int l = methodInfos.length;
-
+
/*
* if this class is public, then check each of the currently
* 'non-upcasted' methods to see if we have a match
@@ -397,11 +397,11 @@
return upcastCount;
}
-
+
/**
- * For a given method, retrieves its publicly accessible counterpart.
+ * For a given method, retrieves its publicly accessible counterpart.
* This method will look for a method with same name
- * and signature declared in a public superclass or implemented interface of this
+ * and signature declared in a public superclass or implemented interface of this
* method's declaring class. This counterpart method is publicly callable.
*
* @param method a method whose publicly callable counterpart is requested.
@@ -412,7 +412,7 @@
public static Method getPublicMethod(Method method)
{
Class clazz = method.getDeclaringClass();
-
+
/*
* Short circuit for (hopefully the majority of) cases where the declaring
* class is public.
@@ -428,8 +428,8 @@
/**
* Looks up the method with specified name and signature in the first public
- * superclass or implemented interface of the class.
- *
+ * superclass or implemented interface of the class.
+ *
* @param clazz the class whose method is sought
* @param name the name of the method
* @param paramTypes the classes of method parameters
@@ -461,13 +461,13 @@
* try the superclass
*/
-
+
Class superclazz = clazz.getSuperclass();
if ( superclazz != null )
{
Method superclazzMethod = getPublicMethod(superclazz, name, paramTypes);
-
+
if(superclazzMethod != null)
{
return superclazzMethod;
@@ -483,7 +483,7 @@
for(int i = 0; i < interfaces.length; ++i)
{
Method interfaceMethod = getPublicMethod(interfaces[i], name, paramTypes);
-
+
if(interfaceMethod != null)
{
return interfaceMethod;
@@ -502,7 +502,7 @@
String name;
Class[] parameterTypes;
boolean upcast;
-
+
MethodInfo(Method method)
{
this.method = null;
@@ -510,7 +510,7 @@
parameterTypes = method.getParameterTypes();
upcast = false;
}
-
+
void tryUpcasting(Class clazz)
throws NoSuchMethodException
{
Modified: jakarta/velocity/engine/trunk/src/java/org/apache/velocity/util/introspection/Info.java
URL: http://svn.apache.org/viewvc/jakarta/velocity/engine/trunk/src/java/org/apache/velocity/util/introspection/Info.java?view=diff&rev=447969&r1=447968&r2=447969
==============================================================================
--- jakarta/velocity/engine/trunk/src/java/org/apache/velocity/util/introspection/Info.java (original)
+++ jakarta/velocity/engine/trunk/src/java/org/apache/velocity/util/introspection/Info.java Tue Sep 19 14:00:14 2006
@@ -74,8 +74,8 @@
/**
* Formats a textual representation of this object as <code>SOURCE
* [line X, column Y]</code>.
- *
- * @return String representing this object.
+ *
+ * @return String representing this object.
*/
public String toString()
{
Modified: jakarta/velocity/engine/trunk/src/java/org/apache/velocity/util/introspection/IntrospectionCacheData.java
URL: http://svn.apache.org/viewvc/jakarta/velocity/engine/trunk/src/java/org/apache/velocity/util/introspection/IntrospectionCacheData.java?view=diff&rev=447969&r1=447968&r2=447969
==============================================================================
--- jakarta/velocity/engine/trunk/src/java/org/apache/velocity/util/introspection/IntrospectionCacheData.java (original)
+++ jakarta/velocity/engine/trunk/src/java/org/apache/velocity/util/introspection/IntrospectionCacheData.java Tue Sep 19 14:00:14 2006
@@ -25,13 +25,13 @@
*/
public class IntrospectionCacheData
{
- /**
- * Object to pair with class - currently either a Method or
+ /**
+ * Object to pair with class - currently either a Method or
* AbstractExecutor. It can be used in any way the using node
- * wishes.
+ * wishes.
*/
public Object thingy;
-
+
/**
* Class of context data object associated with the introspection
* information
Modified: jakarta/velocity/engine/trunk/src/java/org/apache/velocity/util/introspection/Introspector.java
URL: http://svn.apache.org/viewvc/jakarta/velocity/engine/trunk/src/java/org/apache/velocity/util/introspection/Introspector.java?view=diff&rev=447969&r1=447968&r2=447969
==============================================================================
--- jakarta/velocity/engine/trunk/src/java/org/apache/velocity/util/introspection/Introspector.java (original)
+++ jakarta/velocity/engine/trunk/src/java/org/apache/velocity/util/introspection/Introspector.java Tue Sep 19 14:00:14 2006
@@ -26,7 +26,7 @@
* object for a particular class given the name of a method
* and the parameters to the method in the form of an Object[]
*
- * The first time the Introspector sees a
+ * The first time the Introspector sees a
* class it creates a class method map for the
* class in question. Basically the class method map
* is a Hastable where Method objects are keyed by a
@@ -42,7 +42,7 @@
* "method" + "java.lang.String" + "java.lang.StringBuffer"
*
* This mapping is performed for all the methods in a class
- * and stored for
+ * and stored for
* @author <a href="mailto:jvanzyl@apache.org">Jason van Zyl</a>
* @author <a href="mailto:bob@werken.com">Bob McWhirter</a>
* @author <a href="mailto:szegedia@freemail.hu">Attila Szegedi</a>
@@ -55,8 +55,8 @@
* define a public string so that it can be looked for
* if interested
*/
-
- public final static String CACHEDUMP_MSG =
+
+ public final static String CACHEDUMP_MSG =
"Introspector : detected classloader change. Dumping cache.";
/**
@@ -73,14 +73,14 @@
}
/**
- * @param logger
+ * @param logger
* @deprecated RuntimeLogger is deprecated. Use Introspector(Log log).
*/
public Introspector(RuntimeLogger logger)
{
this(new RuntimeLoggerLog(logger));
}
-
+
/**
* Gets the method defined by <code>name</code> and
* <code>params</code> for the Class <code>c</code>.
@@ -91,7 +91,7 @@
* the parameters
*
* @return The desired Method object.
- * @throws Exception
+ * @throws Exception
*/
public Method getMethod(Class c, String name, Object[] params)
throws Exception
@@ -130,10 +130,10 @@
msg.append(params[i].getClass().getName());
}
}
-
+
msg.append(") for class ")
.append(c);
-
+
log.error( msg.toString());
}
Modified: jakarta/velocity/engine/trunk/src/java/org/apache/velocity/util/introspection/IntrospectorBase.java
URL: http://svn.apache.org/viewvc/jakarta/velocity/engine/trunk/src/java/org/apache/velocity/util/introspection/IntrospectorBase.java?view=diff&rev=447969&r1=447968&r2=447969
==============================================================================
--- jakarta/velocity/engine/trunk/src/java/org/apache/velocity/util/introspection/IntrospectorBase.java (original)
+++ jakarta/velocity/engine/trunk/src/java/org/apache/velocity/util/introspection/IntrospectorBase.java Tue Sep 19 14:00:14 2006
@@ -28,7 +28,7 @@
* object for a particular class given the name of a method
* and the parameters to the method in the form of an Object[]
*
- * The first time the Introspector sees a
+ * The first time the Introspector sees a
* class it creates a class method map for the
* class in question. Basically the class method map
* is a Hastable where Method objects are keyed by a
@@ -44,7 +44,7 @@
* "method" + "java.lang.String" + "java.lang.StringBuffer"
*
* This mapping is performed for all the methods in a class
- * and stored for
+ * and stored for
* @author <a href="mailto:jvanzyl@apache.org">Jason van Zyl</a>
* @author <a href="mailto:bob@werken.com">Bob McWhirter</a>
* @author <a href="mailto:szegedia@freemail.hu">Attila Szegedi</a>
@@ -52,19 +52,19 @@
* @version $Id$
*/
public class IntrospectorBase
-{
+{
/**
* Holds the method maps for the classes we know about, keyed by
* Class object.
- */
+ */
protected Map classMethodMaps = new HashMap();
-
+
/**
* Holds the qualified class names for the classes
* we hold in the classMethodMaps hash
*/
protected Set cachedClassNames = new HashSet();
-
+
/**
* Gets the method defined by <code>name</code> and
* <code>params</code> for the Class <code>c</code>.
@@ -75,45 +75,45 @@
* the parameters
*
* @return The desired Method object.
- * @throws Exception
+ * @throws Exception
*/
public Method getMethod(Class c, String name, Object[] params)
throws Exception
{
if (c == null)
{
- throw new Exception (
+ throw new Exception (
"Introspector.getMethod(): Class method key was null: " + name );
- }
+ }
ClassMap classMap = null;
-
+
synchronized(classMethodMaps)
{
classMap = (ClassMap)classMethodMaps.get(c);
-
+
/*
* if we don't have this, check to see if we have it
* by name. if so, then we have a classloader change
* so dump our caches.
*/
-
+
if (classMap == null)
- {
+ {
if ( cachedClassNames.contains( c.getName() ))
{
/*
* we have a map for a class with same name, but not
- * this class we are looking at. This implies a
+ * this class we are looking at. This implies a
* classloader change, so dump
*/
- clearCache();
+ clearCache();
}
-
+
classMap = createClassMap(c);
}
}
-
+
return classMap.findMethod(name, params);
}
@@ -121,12 +121,12 @@
* Creates a class map for specific class and registers it in the
* cache. Also adds the qualified name to the name->class map
* for later Classloader change detection.
- * @param c
+ * @param c
* @return A ClassMap object.
*/
protected ClassMap createClassMap(Class c)
- {
- ClassMap classMap = new ClassMap( c );
+ {
+ ClassMap classMap = new ClassMap( c );
classMethodMaps.put(c, classMap);
cachedClassNames.add( c.getName() );
@@ -145,7 +145,7 @@
* just dump it.
*/
classMethodMaps.clear();
-
+
/*
* for speed, we can just make a new one
* and let the old one be GC'd
Modified: jakarta/velocity/engine/trunk/src/java/org/apache/velocity/util/introspection/MethodMap.java
URL: http://svn.apache.org/viewvc/jakarta/velocity/engine/trunk/src/java/org/apache/velocity/util/introspection/MethodMap.java?view=diff&rev=447969&r1=447968&r2=447969
==============================================================================
--- jakarta/velocity/engine/trunk/src/java/org/apache/velocity/util/introspection/MethodMap.java (original)
+++ jakarta/velocity/engine/trunk/src/java/org/apache/velocity/util/introspection/MethodMap.java Tue Sep 19 14:00:14 2006
@@ -48,7 +48,7 @@
* Add a method to a list of methods by name.
* For a particular class we are keeping track
* of all the methods with the same name.
- * @param method
+ * @param method
*/
public void add(Method method)
{
Modified: jakarta/velocity/engine/trunk/src/java/org/apache/velocity/util/introspection/Uberspect.java
URL: http://svn.apache.org/viewvc/jakarta/velocity/engine/trunk/src/java/org/apache/velocity/util/introspection/Uberspect.java?view=diff&rev=447969&r1=447968&r2=447969
==============================================================================
--- jakarta/velocity/engine/trunk/src/java/org/apache/velocity/util/introspection/Uberspect.java (original)
+++ jakarta/velocity/engine/trunk/src/java/org/apache/velocity/util/introspection/Uberspect.java Tue Sep 19 14:00:14 2006
@@ -29,48 +29,48 @@
{
/**
* Initializer - will be called before use
- * @throws Exception
+ * @throws Exception
*/
public void init() throws Exception;
/**
* To support iteratives - #foreach()
- * @param obj
- * @param info
+ * @param obj
+ * @param info
* @return An Iterator.
- * @throws Exception
+ * @throws Exception
*/
public Iterator getIterator(Object obj, Info info) throws Exception;
/**
* Returns a general method, corresponding to $foo.bar( $woogie )
- * @param obj
- * @param method
- * @param args
- * @param info
+ * @param obj
+ * @param method
+ * @param args
+ * @param info
* @return A Velocity Method.
- * @throws Exception
+ * @throws Exception
*/
public VelMethod getMethod(Object obj, String method, Object[] args, Info info) throws Exception;
/**
* Property getter - returns VelPropertyGet appropos for #set($foo = $bar.woogie)
- * @param obj
- * @param identifier
- * @param info
+ * @param obj
+ * @param identifier
+ * @param info
* @return A Velocity Getter.
- * @throws Exception
+ * @throws Exception
*/
public VelPropertyGet getPropertyGet(Object obj, String identifier, Info info) throws Exception;
/**
* Property setter - returns VelPropertySet appropos for #set($foo.bar = "geir")
- * @param obj
- * @param identifier
- * @param arg
- * @param info
+ * @param obj
+ * @param identifier
+ * @param arg
+ * @param info
* @return A Velocity Setter.
- * @throws Exception
+ * @throws Exception
*/
public VelPropertySet getPropertySet(Object obj, String identifier, Object arg, Info info) throws Exception;
}
Modified: jakarta/velocity/engine/trunk/src/java/org/apache/velocity/util/introspection/UberspectImpl.java
URL: http://svn.apache.org/viewvc/jakarta/velocity/engine/trunk/src/java/org/apache/velocity/util/introspection/UberspectImpl.java?view=diff&rev=447969&r1=447968&r2=447969
==============================================================================
--- jakarta/velocity/engine/trunk/src/java/org/apache/velocity/util/introspection/UberspectImpl.java (original)
+++ jakarta/velocity/engine/trunk/src/java/org/apache/velocity/util/introspection/UberspectImpl.java Tue Sep 19 14:00:14 2006
@@ -68,7 +68,7 @@
/**
* Sets the runtime logger - this must be called before anything
* else.
- *
+ *
* @param log The logger instance to use.
*/
public void setLog(Log log)
@@ -77,7 +77,7 @@
}
/**
- * @param runtimeLogger
+ * @param runtimeLogger
* @deprecated Use setLog(Log log) instead.
*/
public void setRuntimeLogger(RuntimeLogger runtimeLogger)
@@ -94,7 +94,7 @@
* @param obj The iterative object.
* @param i Info about the object's location.
* @return An {@link Iterator} object.
- * @throws Exception
+ * @throws Exception
*/
public Iterator getIterator(Object obj, Info i)
throws Exception
@@ -142,12 +142,12 @@
/**
* Method
- * @param obj
- * @param methodName
- * @param args
- * @param i
+ * @param obj
+ * @param methodName
+ * @param args
+ * @param i
* @return A Velocity Method.
- * @throws Exception
+ * @throws Exception
*/
public VelMethod getMethod(Object obj, String methodName, Object[] args, Info i)
throws Exception
@@ -164,11 +164,11 @@
/**
* Property getter
- * @param obj
- * @param identifier
- * @param i
+ * @param obj
+ * @param identifier
+ * @param i
* @return A Velocity Getter Method.
- * @throws Exception
+ * @throws Exception
*/
public VelPropertyGet getPropertyGet(Object obj, String identifier, Info i)
throws Exception
@@ -177,7 +177,7 @@
{
return null;
}
-
+
Class claz = obj.getClass();
/*
@@ -210,12 +210,12 @@
/**
* Property setter
- * @param obj
- * @param identifier
- * @param arg
- * @param i
+ * @param obj
+ * @param identifier
+ * @param arg
+ * @param i
* @return A Velocity Setter method.
- * @throws Exception
+ * @throws Exception
*/
public VelPropertySet getPropertySet(Object obj, String identifier,
Object arg, Info i)
@@ -225,7 +225,7 @@
{
return null;
}
-
+
Class claz = obj.getClass();
/*
@@ -301,7 +301,7 @@
}
/**
- *
+ *
*
*/
public static class VelGetterImpl implements VelPropertyGet
@@ -373,7 +373,7 @@
* @param o is the Object to invoke it on.
* @param value in the Value to set.
* @return The resulting Object.
- * @throws Exception
+ * @throws Exception
*/
public Object invoke(final Object o, final Object value)
throws Exception
Modified: jakarta/velocity/engine/trunk/src/java/org/apache/velocity/util/introspection/UberspectLoggable.java
URL: http://svn.apache.org/viewvc/jakarta/velocity/engine/trunk/src/java/org/apache/velocity/util/introspection/UberspectLoggable.java?view=diff&rev=447969&r1=447968&r2=447969
==============================================================================
--- jakarta/velocity/engine/trunk/src/java/org/apache/velocity/util/introspection/UberspectLoggable.java (original)
+++ jakarta/velocity/engine/trunk/src/java/org/apache/velocity/util/introspection/UberspectLoggable.java Tue Sep 19 14:00:14 2006
@@ -36,12 +36,12 @@
/**
* Sets the logger. This will be called before any calls to the
* uberspector
- * @param log
+ * @param log
*/
public void setLog(Log log);
/**
- * @param logger
+ * @param logger
* @deprecated Use setLog(Log log) instead.
*/
public void setRuntimeLogger(RuntimeLogger logger);
Modified: jakarta/velocity/engine/trunk/src/java/org/apache/velocity/util/introspection/VelMethod.java
URL: http://svn.apache.org/viewvc/jakarta/velocity/engine/trunk/src/java/org/apache/velocity/util/introspection/VelMethod.java?view=diff&rev=447969&r1=447968&r2=447969
==============================================================================
--- jakarta/velocity/engine/trunk/src/java/org/apache/velocity/util/introspection/VelMethod.java (original)
+++ jakarta/velocity/engine/trunk/src/java/org/apache/velocity/util/introspection/VelMethod.java Tue Sep 19 14:00:14 2006
@@ -30,10 +30,10 @@
/**
* invocation method - called when the method invocationshould be
* preformed and a value returned
- * @param o
- * @param params
+ * @param o
+ * @param params
* @return The resulting object.
- * @throws Exception
+ * @throws Exception
*/
public Object invoke(Object o, Object[] params)
throws Exception;
Modified: jakarta/velocity/engine/trunk/src/java/org/apache/velocity/util/introspection/VelPropertyGet.java
URL: http://svn.apache.org/viewvc/jakarta/velocity/engine/trunk/src/java/org/apache/velocity/util/introspection/VelPropertyGet.java?view=diff&rev=447969&r1=447968&r2=447969
==============================================================================
--- jakarta/velocity/engine/trunk/src/java/org/apache/velocity/util/introspection/VelPropertyGet.java (original)
+++ jakarta/velocity/engine/trunk/src/java/org/apache/velocity/util/introspection/VelPropertyGet.java Tue Sep 19 14:00:14 2006
@@ -30,9 +30,9 @@
/**
* invocation method - called when the 'get action' should be
* preformed and a value returned
- * @param o
+ * @param o
* @return The resulting Object.
- * @throws Exception
+ * @throws Exception
*/
public Object invoke(Object o) throws Exception;
Modified: jakarta/velocity/engine/trunk/src/java/org/apache/velocity/util/introspection/VelPropertySet.java
URL: http://svn.apache.org/viewvc/jakarta/velocity/engine/trunk/src/java/org/apache/velocity/util/introspection/VelPropertySet.java?view=diff&rev=447969&r1=447968&r2=447969
==============================================================================
--- jakarta/velocity/engine/trunk/src/java/org/apache/velocity/util/introspection/VelPropertySet.java (original)
+++ jakarta/velocity/engine/trunk/src/java/org/apache/velocity/util/introspection/VelPropertySet.java Tue Sep 19 14:00:14 2006
@@ -33,7 +33,7 @@
* @param o Object on which the method will be called with the arg
* @param arg value to be set
* @return the value returned from the set operation (impl specific)
- * @throws Exception
+ * @throws Exception
*/
public Object invoke(Object o, Object arg) throws Exception;
Modified: jakarta/velocity/engine/trunk/src/parser/Parser.jjt
URL: http://svn.apache.org/viewvc/jakarta/velocity/engine/trunk/src/parser/Parser.jjt?view=diff&rev=447969&r1=447968&r2=447969
==============================================================================
--- jakarta/velocity/engine/trunk/src/parser/Parser.jjt (original)
+++ jakarta/velocity/engine/trunk/src/parser/Parser.jjt Tue Sep 19 14:00:14 2006
@@ -193,7 +193,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)
{
@@ -696,10 +696,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: "##">
{
@@ -883,7 +883,7 @@
SwitchTo(DIRECTIVE);
}
-| <ELSE_DIRECTIVE:
+| <ELSE_DIRECTIVE:
( "else" ( ( " " | "\t" )* ( "\n" | "\r" | "\r\n" ) )? )
| ( "{else}" ( ( " " | "\t" )* ( "\n" | "\r" | "\r\n" ) )? ) >
{
@@ -907,13 +907,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
*/
@@ -921,7 +921,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
@@ -1236,7 +1236,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()
{
@@ -1286,13 +1286,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);
@@ -1354,8 +1354,8 @@
argPos = 0;
}
-
-
+
+
/*
* if this is indeed a token, match the #foo ( arg ) pattern
*/
@@ -1490,7 +1490,7 @@
| True()
| False()
| Reference()
- | FloatingPointLiteral()
+ | FloatingPointLiteral()
)
[ <WHITESPACE>]
}
@@ -1695,7 +1695,7 @@
| Reference()
| IntegerLiteral()
| LOOKAHEAD( <LBRACKET> [<WHITESPACE>] ( Reference() | IntegerLiteral()) [<WHITESPACE>] <DOUBLEDOT> ) IntegerRange()
- | FloatingPointLiteral()
+ | FloatingPointLiteral()
| Map()
| ObjectArray()
| True()
Modified: jakarta/velocity/engine/trunk/src/test/org/apache/velocity/test/AbsoluteFileResourceLoaderTestCase.java
URL: http://svn.apache.org/viewvc/jakarta/velocity/engine/trunk/src/test/org/apache/velocity/test/AbsoluteFileResourceLoaderTestCase.java?view=diff&rev=447969&r1=447968&r2=447969
==============================================================================
--- jakarta/velocity/engine/trunk/src/test/org/apache/velocity/test/AbsoluteFileResourceLoaderTestCase.java (original)
+++ jakarta/velocity/engine/trunk/src/test/org/apache/velocity/test/AbsoluteFileResourceLoaderTestCase.java Tue Sep 19 14:00:14 2006
@@ -52,7 +52,7 @@
private static final String RESULT_FILE_EXT = "res";
/**
- * Path to template file. This will get combined with the
+ * Path to template file. This will get combined with the
* application directory to form an absolute path
*/
private final static String TEMPLATE_PATH = TEST_COMPARE_DIR + "/absolute/absolute";
Modified: jakarta/velocity/engine/trunk/src/test/org/apache/velocity/test/BaseTestCase.java
URL: http://svn.apache.org/viewvc/jakarta/velocity/engine/trunk/src/test/org/apache/velocity/test/BaseTestCase.java?view=diff&rev=447969&r1=447968&r2=447969
==============================================================================
--- jakarta/velocity/engine/trunk/src/test/org/apache/velocity/test/BaseTestCase.java (original)
+++ jakarta/velocity/engine/trunk/src/test/org/apache/velocity/test/BaseTestCase.java Tue Sep 19 14:00:14 2006
@@ -80,21 +80,21 @@
{
buf.append(baseFile.getPath());
}
-
+
buf.append('.').append(ext);
if (mustExist)
{
File testFile = new File(buf.toString());
-
+
if (!testFile.exists())
{
- fail("getFileName() result " + testFile.getPath() + " does not exist!");
+ fail("getFileName() result " + testFile.getPath() + " does not exist!");
}
if (!testFile.isFile())
{
- fail("getFileName() result " + testFile.getPath() + " is not a file!");
+ fail("getFileName() result " + testFile.getPath() + " is not a file!");
}
}
}
Modified: jakarta/velocity/engine/trunk/src/test/org/apache/velocity/test/ClassloaderChangeTestCase.java
URL: http://svn.apache.org/viewvc/jakarta/velocity/engine/trunk/src/test/org/apache/velocity/test/ClassloaderChangeTestCase.java?view=diff&rev=447969&r1=447968&r2=447969
==============================================================================
--- jakarta/velocity/engine/trunk/src/test/org/apache/velocity/test/ClassloaderChangeTestCase.java (original)
+++ jakarta/velocity/engine/trunk/src/test/org/apache/velocity/test/ClassloaderChangeTestCase.java Tue Sep 19 14:00:14 2006
@@ -93,7 +93,7 @@
* put it into the context
*/
vc.put("foo", foo);
-
+
/*
* and render something that would use it
* that will get it into the introspector cache
@@ -122,7 +122,7 @@
writer = new StringWriter();
ve.evaluate( vc, writer, "test", "$foo.doIt()");
-
+
if ( !writer.toString().equals( OUTPUT ))
{
fail("Output from doIt() incorrect");
@@ -178,13 +178,13 @@
throws Exception
{
File f = new File( testclass );
-
+
byte[] barr = new byte[ (int) f.length() ];
-
+
FileInputStream fis = new FileInputStream( f );
fis.read( barr );
fis.close();
-
+
fooClass = defineClass("Foo", barr, 0, barr.length);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-dev-help@jakarta.apache.org