diff options
author | Claude Brisson <cbrisson@apache.org> | 2019-03-11 11:09:53 +0000 |
---|---|---|
committer | Claude Brisson <cbrisson@apache.org> | 2019-03-11 11:09:53 +0000 |
commit | cff1b533e2eed743724dbb667cdffd186436e50d (patch) | |
tree | 651396cd1d10187b63bc8871d91f98ecfc8fe794 /velocity-engine-core/src/main/java/org/apache/velocity/runtime | |
parent | 475102e1a631ef896f85db7f750533211b9d0b11 (diff) | |
download | apache-velocity-engine-cff1b533e2eed743724dbb667cdffd186436e50d.tar.gz |
[engine] javadoc and indentation fixes
git-svn-id: https://svn.apache.org/repos/asf/velocity/engine/trunk@1855206 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'velocity-engine-core/src/main/java/org/apache/velocity/runtime')
35 files changed, 353 insertions, 119 deletions
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeInstance.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeInstance.java index 8350299c..3386824d 100644 --- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeInstance.java +++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeInstance.java @@ -73,16 +73,16 @@ import java.util.Properties; import java.util.Set; /** - * This is the Runtime system for Velocity. It is the + * <p>This is the Runtime system for Velocity. It is the * single access point for all functionality in Velocity. * It adheres to the mediator pattern and is the only * structure that developers need to be familiar with - * in order to get Velocity to perform. + * in order to get Velocity to perform.</p> * - * The Runtime will also cooperate with external + * <p>The Runtime will also cooperate with external * systems, which can make all needed setProperty() calls - * before calling init(). - * + * before calling init().</p> + * <pre> * ----------------------------------------------------------------------- * N O T E S O N R U N T I M E I N I T I A L I Z A T I O N * ----------------------------------------------------------------------- @@ -528,6 +528,7 @@ public class RuntimeInstance implements RuntimeConstants, RuntimeServices /** * Add all properties contained in the file fileName to the RuntimeInstance properties + * @param fileName */ public void setProperties(String fileName) { @@ -553,6 +554,7 @@ public class RuntimeInstance implements RuntimeConstants, RuntimeServices /** * Add all the properties in props to the RuntimeInstance properties + * @param props */ public void setProperties(Properties props) { diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeServices.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeServices.java index 553337fe..aa99b2a5 100644 --- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeServices.java +++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeServices.java @@ -182,7 +182,6 @@ public interface RuntimeServices * @throws ParseErrorException The template could not be parsed. * @throws MethodInvocationException A method on a context object could not be invoked. * @throws ResourceNotFoundException A referenced resource could not be loaded. - * @throws IOException While rendering to the writer, an I/O problem occurred. * @since Velocity 1.6 */ boolean evaluate(Context context, Writer out, diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeSingleton.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeSingleton.java index 29164f81..71739a0c 100644 --- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeSingleton.java +++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeSingleton.java @@ -38,16 +38,16 @@ import java.util.List; import java.util.Properties; /** - * This is the Runtime system for Velocity. It is the + * <p>This is the Runtime system for Velocity. It is the * single access point for all functionality in Velocity. * It adheres to the mediator pattern and is the only * structure that developers need to be familiar with - * in order to get Velocity to perform. + * in order to get Velocity to perform.</p> * - * The Runtime will also cooperate with external + * <p>The Runtime will also cooperate with external * systems, which can make all needed setProperty() calls - * before calling init(). - * + * before calling init().</p> + * <pre> * ----------------------------------------------------------------------- * N O T E S O N R U N T I M E I N I T I A L I Z A T I O N * ----------------------------------------------------------------------- @@ -419,6 +419,7 @@ public class RuntimeSingleton implements RuntimeConstants * @param macroArgs Array of macro arguments, containing the * #macro() arguments and default values. the 0th is the name. * @param definingTemplate Template containing the definition of the macro. + * @return true for success */ public static boolean addVelocimacro(String name, Node macro, List<Macro.MacroArg> macroArgs, Template definingTemplate) @@ -501,7 +502,7 @@ public class RuntimeSingleton implements RuntimeConstants /** * Directly set the ExtProperties configuration object - * + * @param configuration * @see RuntimeInstance#setConfiguration(ExtProperties) */ public static void setConfiguration(ExtProperties configuration) @@ -509,7 +510,6 @@ public class RuntimeSingleton implements RuntimeConstants ri.setConfiguration(configuration); } - /** * Return the velocity runtime configuration object. * diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/VelocimacroManager.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/VelocimacroManager.java index 994f47d6..da20fa1f 100644 --- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/VelocimacroManager.java +++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/VelocimacroManager.java @@ -293,6 +293,7 @@ public class VelocimacroManager } /** + * @param is * @since 1.6 */ public void setInlineReplacesGlobal(boolean is) diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Block.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Block.java index 5fccdaae..72c9c13f 100755 --- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Block.java +++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Block.java @@ -51,6 +51,7 @@ public abstract class Block extends Directive /** * Return type of this directive. + * @return type, DirectiveConstants.BLOCK or DirectiveConstants.LINE */ public int getType() { @@ -59,6 +60,9 @@ public abstract class Block extends Directive /** * simple init - get the key + * @param rs + * @param context + * @param node */ public void init(RuntimeServices rs, InternalContextAdapter context, Node node) throws TemplateInitException @@ -74,6 +78,12 @@ public abstract class Block extends Directive block = node.jjtGetChild(node.jjtGetNumChildren() - 1); } + /** + * renders block directive + * @param context + * @param writer + * @return success status + */ public boolean render(InternalContextAdapter context, Writer writer) { preRender(context); @@ -106,6 +116,8 @@ public abstract class Block extends Directive * Creates a string identifying the source and location of the block * definition, and the current template being rendered if that is * different. + * @param context + * @return id string */ protected String id(InternalContextAdapter context) { @@ -129,6 +141,10 @@ public abstract class Block extends Directive private Block parent; private int depth; + /** + * @param context + * @param parent + */ public Reference(InternalContextAdapter context, Block parent) { this.context = context; @@ -137,6 +153,9 @@ public abstract class Block extends Directive /** * Render the AST of this block into the writer using the context. + * @param context + * @param writer + * @return success status */ public boolean render(InternalContextAdapter context, Writer writer) { @@ -164,12 +183,16 @@ public abstract class Block extends Directive /** * Makes #if( $blockRef ) true without rendering, so long as we aren't beyond max depth. + * @return reference value as boolean */ public boolean getAsBoolean() { return depth <= parent.maxDepth; } + /** + * @return rendered string + */ public String toString() { Writer writer = new StringBuilderWriter(); diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/BlockMacro.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/BlockMacro.java index ab747df7..bc222c7d 100644 --- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/BlockMacro.java +++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/BlockMacro.java @@ -81,6 +81,7 @@ public class BlockMacro extends Block * Initializes the directive. * * @param rs + * @param macroName * @param context * @param node * @throws TemplateInitException diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Directive.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Directive.java index 33320bcb..2cbf2d78 100644 --- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Directive.java +++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Directive.java @@ -85,6 +85,7 @@ public abstract class Directive implements DirectiveConstants, Cloneable * Allows the template location to be set. * @param line * @param column + * @param template */ public void setLocation(int line, int column, Template template) { @@ -173,6 +174,7 @@ public abstract class Directive implements DirectiveConstants, Cloneable * for example ParserTreeConstants.JJTWORD * @param t token of directive * @param templateName the name of the template this directive is referenced in. + * @throws ParseException */ public void checkArgs(ArrayList<Integer> argtypes, Token t, String templateName) throws ParseException @@ -199,6 +201,7 @@ public abstract class Directive implements DirectiveConstants, Cloneable /** * This creates and places the scope control for this directive * into the context (if scope provision is turned on). + * @param context */ protected void preRender(InternalContextAdapter context) { @@ -210,6 +213,10 @@ public abstract class Directive implements DirectiveConstants, Cloneable } } + /** + * @param prev + * @return scope + */ protected Scope makeScope(Object prev) { return new Scope(this, prev); @@ -218,6 +225,7 @@ public abstract class Directive implements DirectiveConstants, Cloneable /** * This cleans up any scope control for this directive after rendering, * assuming the scope control was turned on. + * @param context */ protected void postRender(InternalContextAdapter context) { diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Foreach.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Foreach.java index 7356a3ae..ab09f7fd 100644 --- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Foreach.java +++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Foreach.java @@ -153,6 +153,9 @@ public class Foreach extends Directive * are set locally or not. So, those in favor of VELOCITY-285, can * make that happen easily by overriding this and having it use * context.localPut(k,v). See VELOCITY-630 for more on this. + * @param context + * @param key + * @param value */ protected void put(InternalContextAdapter context, String key, Object value) { @@ -161,6 +164,9 @@ public class Foreach extends Directive /** * Retrieve the contextual iterator. + * @param iterable + * @param node + * @return iterator */ protected Iterator getIterator(Object iterable, Node node) { diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/RuntimeMacro.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/RuntimeMacro.java index cbd2172f..9481b05a 100644 --- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/RuntimeMacro.java +++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/RuntimeMacro.java @@ -118,6 +118,7 @@ public class RuntimeMacro extends Directive * just save the values to use at the render time. * * @param rs runtime services + * @param name macro name * @param context InternalContextAdapter * @param node node containing the macro call */ diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Scope.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Scope.java index 3026a747..beedf05f 100755 --- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Scope.java +++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Scope.java @@ -41,6 +41,10 @@ public class Scope extends AbstractMap private Info info; protected final Object owner; + /** + * @param owner + * @param previous + */ public Scope(Object owner, Object previous) { this.owner = owner; @@ -66,11 +70,19 @@ public class Scope extends AbstractMap return storage; } + /** + * @return entry set + */ public Set entrySet() { return getStorage().entrySet(); } + /** + * getter + * @param key + * @return found value + */ @Override public Object get(Object key) { @@ -82,6 +94,12 @@ public class Scope extends AbstractMap return o; } + /** + * setter + * @param key + * @param value + * @return previous value + */ @Override public Object put(Object key, Object value) { @@ -92,6 +110,9 @@ public class Scope extends AbstractMap * Convenience method to call put(key,val) in a template * without worrying about what is returned/rendered by the call. * This should ALWAYS return an empty string. + * @param key + * @param value + * @return empty string */ public String set(Object key, Object value) { @@ -112,6 +133,7 @@ public class Scope extends AbstractMap * that are stacked up. This is the distance between this * instance and the topmost instance, plus one. This value * will never be negative or zero. + * @return depth */ protected int getDepth() { @@ -125,6 +147,7 @@ public class Scope extends AbstractMap /** * Returns the topmost parent control reference, retrieved * by simple recursion on {@link #getParent}. + * @return top-most scope */ public Scope getTopmost() { @@ -138,6 +161,7 @@ public class Scope extends AbstractMap /** * Returns the parent control reference overridden by the placement * of this instance in the context. + * @return parent scope */ public Scope getParent() { @@ -149,6 +173,7 @@ public class Scope extends AbstractMap * of this instance in the context. If there was none (as is hoped), * then this will return null. This never returns parent controls; * those are returned by {@link #getParent}. + * @return replaced reference value, or null */ public Object getReplaced() { @@ -161,6 +186,7 @@ public class Scope extends AbstractMap /** * Returns info about the current scope for debugging purposes. + * @return template debugging infos */ public Info getInfo() { @@ -181,6 +207,11 @@ public class Scope extends AbstractMap private Directive directive; private Template template; + /** + * c'tor + * @param scope + * @param owner + */ public Info(Scope scope, Object owner) { if (owner instanceof Directive) @@ -194,6 +225,10 @@ public class Scope extends AbstractMap this.scope = scope; } + /** + * name getter + * @return name + */ public String getName() { if (directive != null) @@ -207,6 +242,10 @@ public class Scope extends AbstractMap return null; } + /** + * type getter + * @return scope type + */ public String getType() { if (directive != null) @@ -226,11 +265,19 @@ public class Scope extends AbstractMap return null; } + /** + * current depth + * @return depth + */ public int getDepth() { return scope.getDepth(); } + /** + * template name getter + * @return template name + */ public String getTemplate() { if (directive != null) @@ -244,6 +291,10 @@ public class Scope extends AbstractMap return null; } + /** + * line getter + * @return line number + */ public int getLine() { if (directive != null) @@ -253,6 +304,10 @@ public class Scope extends AbstractMap return 0; } + /** + * column getter + * @return column number + */ public int getColumn() { if (directive != null) @@ -262,6 +317,10 @@ public class Scope extends AbstractMap return 0; } + /** + * string representation getter + * @return string representation + */ public String toString() { StringBuilder sb = new StringBuilder(); diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/VelocimacroProxy.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/VelocimacroProxy.java index 258e4fbd..0b412dc4 100644 --- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/VelocimacroProxy.java +++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/VelocimacroProxy.java @@ -112,6 +112,7 @@ public class VelocimacroProxy extends Directive /** * Return the list of macro arguments associated with this macro + * @return macro arguments */ public List<Macro.MacroArg> getMacroArgs() { @@ -128,7 +129,6 @@ public class VelocimacroProxy extends Directive /** * returns the number of ars needed for this VM - * * @return The number of ars needed for this VM */ public int getNumArgs() @@ -138,6 +138,7 @@ public class VelocimacroProxy extends Directive /** * Initialize members of VelocimacroProxy. called from MacroEntry + * @param rs runtime services */ public void init(RuntimeServices rs) { @@ -156,6 +157,14 @@ public class VelocimacroProxy extends Directive preserveArgumentsLiterals = rsvc.getBoolean(RuntimeConstants.VM_PRESERVE_ARGUMENTS_LITERALS, false); } + /** + * Render the macro AST node + * @param context + * @param writer + * @param node + * @return success status + * @throws IOException + */ public boolean render(InternalContextAdapter context, Writer writer, Node node) throws IOException { @@ -259,6 +268,8 @@ public class VelocimacroProxy extends Directive /** * Check whether the number of arguments given matches the number defined. + * @param node + * @param callArgNum */ protected void checkArgumentCount(Node node, int callArgNum) { @@ -280,6 +291,7 @@ public class VelocimacroProxy extends Directive /** * check that we aren't already at the max call depth and throws * a MacroOverflowException if we are there. + * @param context */ protected void checkDepth(InternalContextAdapter context) { @@ -316,6 +328,10 @@ public class VelocimacroProxy extends Directive * the argument names. Store and return an array of old and new values * paired for each argument name, for later cleanup. Also, put literal * representations of arguments which evaluate to null in the context. + * @param context + * @param node + * @param callArgNum + * @return macro arguments values */ protected Object[] handleArgValues(InternalContextAdapter context, Node node, int callArgNum) diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/CharStream.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/CharStream.java index 3445800c..de96c43f 100644 --- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/CharStream.java +++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/CharStream.java @@ -34,81 +34,94 @@ package org.apache.velocity.runtime.parser; * operation. */ -public interface CharStream { +public interface CharStream +{ + /** + * Returns the next character from the selected input. The method + * of selecting the input is the responsibility of the class + * implementing this interface. Can throw any java.io.IOException. + * @return read char + * @throws java.io.IOException + */ + char readChar() throws java.io.IOException; - /** - * Returns the next character from the selected input. The method - * of selecting the input is the responsibility of the class - * implementing this interface. Can throw any java.io.IOException. - */ - char readChar() throws java.io.IOException; + /** + * Returns the column number of the last character for current token (being + * matched after the last call to BeginTOken). + * @return ending column number + */ + int getEndColumn(); - /** - * Returns the column number of the last character for current token (being - * matched after the last call to BeginTOken). - */ - int getEndColumn(); + /** + * Returns the line number of the last character for current token (being + * matched after the last call to BeginTOken). + * @return ending line number + */ + int getEndLine(); - /** - * Returns the line number of the last character for current token (being - * matched after the last call to BeginTOken). - */ - int getEndLine(); + /** + * Returns the column number of the first character for current token (being + * matched after the last call to BeginTOken). + * @return starting column number + */ + int getBeginColumn(); - /** - * Returns the column number of the first character for current token (being - * matched after the last call to BeginTOken). - */ - int getBeginColumn(); + /** + * Returns the line number of the first character for current token (being + * matched after the last call to BeginTOken). + * @return starting line number + */ + int getBeginLine(); - /** - * Returns the line number of the first character for current token (being - * matched after the last call to BeginTOken). - */ - int getBeginLine(); + /** + * Backs up the input stream by amount steps. Lexer calls this method if it + * had already read some characters, but could not use them to match a + * (longer) token. So, they will be used again as the prefix of the next + * token and it is the implemetation's responsibility to do this right. + * @param amount + */ + void backup(int amount); - /** - * Backs up the input stream by amount steps. Lexer calls this method if it - * had already read some characters, but could not use them to match a - * (longer) token. So, they will be used again as the prefix of the next - * token and it is the implemetation's responsibility to do this right. - */ - void backup(int amount); + /** + * Returns the next character that marks the beginning of the next token. + * All characters must remain in the buffer between two successive calls + * to this method to implement backup correctly. + * @return next token start char + * @throws java.io.IOException + */ + char BeginToken() throws java.io.IOException; - /** - * Returns the next character that marks the beginning of the next token. - * All characters must remain in the buffer between two successive calls - * to this method to implement backup correctly. - */ - char BeginToken() throws java.io.IOException; + /** + * Returns a string made up of characters from the marked token beginning + * to the current buffer position. Implementations have the choice of returning + * anything that they want to. For example, for efficiency, one might decide + * to just return null, which is a valid implementation. + * @return token image + */ + String GetImage(); - /** - * Returns a string made up of characters from the marked token beginning - * to the current buffer position. Implementations have the choice of returning - * anything that they want to. For example, for efficiency, one might decide - * to just return null, which is a valid implementation. - */ - String GetImage(); + /** + * <p>Returns an array of characters that make up the suffix of length 'len' for + * the currently matched token. This is used to build up the matched string + * for use in actions in the case of MORE. A simple and inefficient + * implementation of this is as follows :</p> + * <pre><code> + * { + * String t = GetImage(); + * return t.substring(t.length() - len, t.length()).toCharArray(); + * } + * </code></pre> + * @param len suffix len + * @return suffix + */ + char[] GetSuffix(int len); - /** - * Returns an array of characters that make up the suffix of length 'len' for - * the currently matched token. This is used to build up the matched string - * for use in actions in the case of MORE. A simple and inefficient - * implementation of this is as follows : - * - * { - * String t = GetImage(); - * return t.substring(t.length() - len, t.length()).toCharArray(); - * } - */ - char[] GetSuffix(int len); - - /** - * The lexer calls this function to indicate that it is done with the stream - * and hence implementations can free any resources held by this class. - * Again, the body of this function can be just empty and it will not - * affect the lexer's operation. - */ - void Done(); + /** + * The lexer calls this function to indicate that it is done with the stream + * and hence implementations can free any resources held by this class. + * Again, the body of this function can be just empty and it will not + * affect the lexer's operation. + */ + void Done(); } diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/ParseException.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/ParseException.java index 7af197ba..5cc68c62 100644 --- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/ParseException.java +++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/ParseException.java @@ -36,7 +36,7 @@ public class ParseException extends Exception { private static final long serialVersionUID = -309603325673449381L; /** - * This constructor is used by the method "generateParseException" + * <p>This constructor is used by the method "generateParseException" * in the generated parser. Calling this constructor generates * a new object of this type with the fields "currentToken", * "expectedTokenSequences", and "tokenImage" set. The boolean @@ -44,8 +44,13 @@ public class ParseException extends Exception { * this constructor was used to create this object. * This constructor calls its super class with the empty string * to force the "toString" method of parent class "Throwable" to - * print the error message in the form: - * ParseException: <result of getMessage> + * print the error message in the form:</p> + * <pre> + * ParseException: <result of getMessage> + * </pre> + * @param currentTokenVal + * @param expectedTokenSequencesVal + * @param tokenImageVal */ public ParseException(Token currentTokenVal, int[][] expectedTokenSequencesVal, @@ -68,12 +73,21 @@ public class ParseException extends Exception { * relevant information. The JavaCC generated code does not use * these constructors. */ - public ParseException() { super(); specialConstructor = false; } + /** + * The following constructors are for use by you for whatever + * purpose you can think of. Constructing the exception in this + * manner makes the exception behave in the normal way - i.e., as + * documented in the class "Throwable". The fields "errorToken", + * "expectedTokenSequences", and "tokenImage" do not contain + * relevant information. The JavaCC generated code does not use + * these constructors. + * @param message + */ public ParseException(String message) { super(message); specialConstructor = false; @@ -116,6 +130,7 @@ public class ParseException extends Exception { * from the parser), then this method is called during the printing * of the final stack trace, and hence the correct error message * gets displayed. + * @return message */ public String getMessage() { if (!specialConstructor) { @@ -170,6 +185,8 @@ public class ParseException extends Exception { * Used to convert raw characters to their escaped version * when these raw version cannot be used as part of an ASCII * string literal. + * @param str raw characters + * @return escaped string */ protected String add_escapes(String str) { StringBuilder retval = new StringBuilder(); diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/TemplateParseException.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/TemplateParseException.java index fe2c7ca6..be511d63 100644 --- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/TemplateParseException.java +++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/TemplateParseException.java @@ -60,7 +60,7 @@ public class TemplateParseException } /** - * This constructor is used by the method "generateParseException" + * <p>This constructor is used by the method "generateParseException" * in the generated parser. Calling this constructor generates * a new object of this type with the fields "currentToken", * "expectedTokenSequences", and "tokenImage" set. The boolean @@ -68,8 +68,10 @@ public class TemplateParseException * this constructor was used to create this object. * This constructor calls its super class with the empty string * to force the "toString" method of parent class "Throwable" to - * print the error message in the form: - * ParseException: <result of getMessage> + * print the error message in the form:</p> + * <pre> + * ParseException: <result of getMessage> + * </pre> * @param currentTokenVal * @param expectedTokenSequencesVal * @param tokenImageVal diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTAndNode.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTAndNode.java index 84ab7be9..c47a3c73 100644 --- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTAndNode.java +++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTAndNode.java @@ -80,9 +80,11 @@ public class ASTAndNode extends ASTLogicalOperator /** * logical and : - * null && right = false - * left && null = false - * null && null = false + * <pre> + * null && right = false + * left && null = false + * null && null = false + * </pre> * @param context * @return True if both sides are true. * @throws MethodInvocationException diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTComparisonNode.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTComparisonNode.java index a0ee06a8..d65d0abc 100644 --- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTComparisonNode.java +++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTComparisonNode.java @@ -84,6 +84,9 @@ public abstract class ASTComparisonNode extends ASTBinaryOperator /** * Always false by default, != and == subclasses must override this. + * @param left + * @param right + * @return comparison result */ public boolean compareNull(Object left, Object right) { @@ -101,6 +104,12 @@ public abstract class ASTComparisonNode extends ASTBinaryOperator return false; } + /** + * compare numbers + * @param left + * @param right + * @return comparison result + */ public Boolean compareNumbers(Object left, Object right) { try diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTIndex.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTIndex.java index 72d6e20f..9d90ca7f 100644 --- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTIndex.java +++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTIndex.java @@ -61,16 +61,29 @@ public class ASTIndex extends SimpleNode */ protected boolean strictRef = false; + /** + * @param i + */ public ASTIndex(int i) { super(i); } + /** + * @param p + * @param i + */ public ASTIndex(Parser p, int i) { super(p, i); } + /** + * @param context + * @param data + * @return data + * @throws TemplateInitException + */ public Object init(InternalContextAdapter context, Object data) throws TemplateInitException { @@ -80,17 +93,19 @@ public class ASTIndex extends SimpleNode return data; } - - private final static Object[] noParams = {}; private final static Class[] noTypes = {}; + /** * If argument is an Integer and negative, then return (o.size() - argument). * Otherwise return the original argument. We use this to calculate the true * index of a negative index e.g., $foo[-1]. If no size() method is found on the * 'o' object, then we throw an VelocityException. + * @param argument + * @param o * @param context Used to access the method cache. * @param node ASTNode used for error reporting. + * @return found object */ public static Object adjMinusIndexArg(Object argument, Object o, InternalContextAdapter context, SimpleNode node) @@ -141,6 +156,12 @@ public class ASTIndex extends SimpleNode return argument; } + /** + * @param o + * @param context + * @return object value + * @throws MethodInvocationException + */ public Object execute(Object o, InternalContextAdapter context) throws MethodInvocationException { diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTMathNode.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTMathNode.java index 069f7df2..c47b9ad5 100755 --- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTMathNode.java +++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTMathNode.java @@ -137,6 +137,10 @@ public abstract class ASTMathNode extends ASTBinaryOperator * Extension hook to allow special behavior by subclasses * If this method returns a non-null value, that is returned, * rather than the result of the math operation. + * @param left + * @param right + * @param context + * @return special value * @see ASTAddNode#handleSpecial */ protected Object handleSpecial(Object left, Object right, InternalContextAdapter context) @@ -147,6 +151,11 @@ public abstract class ASTMathNode extends ASTBinaryOperator /** * Performs the math operation represented by this node. + * @param left + * @param right + * @param context + * @return computed value + * @see ASTAddNode#perform(Number, Number, InternalContextAdapter) */ public abstract Number perform(Number left, Number right, InternalContextAdapter context); diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTOrNode.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTOrNode.java index 7fdd303f..f87d3b6c 100644 --- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTOrNode.java +++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTOrNode.java @@ -80,11 +80,12 @@ public class ASTOrNode extends ASTLogicalOperator /** * the logical or : - * the rule : - * left || null -> left - * null || right -> right - * null || null -> false - * left || right -> left || right + * <pre> + * left || null -> left + * null || right -> right + * null || null -> false + * left || right -> left || right + * </pre> * @param context * @return The evaluation result. * @throws MethodInvocationException diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTReference.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTReference.java index c02a82a0..5727acbe 100644 --- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTReference.java +++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTReference.java @@ -95,7 +95,7 @@ public class ASTReference extends SimpleNode /** * Indicates if we are using modified escape behavior in strict mode. - * mainly we allow \$abc -> to render as $abc + * mainly we allow \$abc -> to render as $abc */ public boolean strictEscape = false; @@ -640,6 +640,8 @@ public class ASTReference extends SimpleNode /** * Utility class to handle nulls when printing a class type + * @param clazz + * @return class name, or the string "null" */ public static String printClass(Class clazz) { diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTStringLiteral.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTStringLiteral.java index d3141ca6..2b197d4e 100644 --- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTStringLiteral.java +++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTStringLiteral.java @@ -178,6 +178,7 @@ public class ASTStringLiteral extends SimpleNode * that the line and column position reported reflects the error position * within the template and not just relative to the error position within * the string literal. + * @param node */ public void adjTokenLineNums(Node node) { @@ -238,6 +239,8 @@ public class ASTStringLiteral extends SimpleNode } /** + * @param string + * @return unescaped string * @since 1.6 */ public static String unescape(final String string) @@ -271,6 +274,9 @@ public class ASTStringLiteral extends SimpleNode /** + * @param visitor + * @param data + * @return rendered object * @see org.apache.velocity.runtime.parser.node.SimpleNode#jjtAccept(org.apache.velocity.runtime.parser.node.ParserVisitor, * java.lang.Object) */ diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/BooleanPropertyExecutor.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/BooleanPropertyExecutor.java index 95b2fdf7..179d03cc 100644 --- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/BooleanPropertyExecutor.java +++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/BooleanPropertyExecutor.java @@ -26,12 +26,12 @@ import org.slf4j.Logger; /** * Handles discovery and valuation of a * boolean object property, of the - * form public boolean is<property> when executed. + * form public boolean is<property> when executed. * * We do this separately as to preserve the current - * quasi-broken semantics of get<as is property> - * get< flip 1st char> get("property") and now followed - * by is<Property> + * quasi-broken semantics of get<as is property> + * get<flip 1st char> get("property") and now followed + * by is<Property> * * @author <a href="geirm@apache.org">Geir Magnusson Jr.</a> * @version $Id$ diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/GetExecutor.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/GetExecutor.java index 08e8606d..0a36cf19 100644 --- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/GetExecutor.java +++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/GetExecutor.java @@ -71,6 +71,7 @@ public class GetExecutor extends AbstractExecutor } /** + * @param clazz * @since 1.5 */ protected void discover(final Class clazz) @@ -106,6 +107,8 @@ public class GetExecutor extends AbstractExecutor } /** + * @param o + * @return value * @see org.apache.velocity.runtime.parser.node.AbstractExecutor#execute(java.lang.Object) */ public Object execute(final Object o) diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/MathUtils.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/MathUtils.java index 927d6434..eda542b6 100644 --- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/MathUtils.java +++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/MathUtils.java @@ -461,7 +461,7 @@ public abstract class MathUtils * Compare two numbers. * @param op1 * @param op2 - * @return 1 if n1 > n2, -1 if n1 < n2 and 0 if equal. + * @return 1 if n1 > n2, -1 if n1 < n2 and 0 if equal. */ public static int compare (Number op1, Number op2) { diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/NodeUtils.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/NodeUtils.java index 252725c0..afbee2ca 100644 --- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/NodeUtils.java +++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/NodeUtils.java @@ -32,7 +32,7 @@ import org.apache.velocity.runtime.parser.Token; public class NodeUtils { /** - * Collect all the <SPECIAL_TOKEN>s that + * Collect all the <SPECIAL_TOKEN>s that * are carried along with a token. Special * tokens do not participate in parsing but * can still trigger certain lexical actions. diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/SimpleNode.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/SimpleNode.java index 1b59935a..59aade33 100644 --- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/SimpleNode.java +++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/SimpleNode.java @@ -328,6 +328,8 @@ public class SimpleNode implements Node /** * Return a string that tells the current location of this node. + * @param context + * @return location */ protected String getLocation(InternalContextAdapter context) { diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/Resource.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/Resource.java index 3f6c8437..faf93a62 100644 --- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/Resource.java +++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/Resource.java @@ -275,6 +275,7 @@ public abstract class Resource /** * Sets the type of this Resource (RESOURCE_TEMPLATE or RESOURCE_CONTENT) + * @param type RESOURCE_TEMPLATE or RESOURCE_CONTENT * @since 1.6 */ public void setType(int type) diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/ResourceManagerImpl.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/ResourceManagerImpl.java index 68644561..eb7054de 100644 --- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/ResourceManagerImpl.java +++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/ResourceManagerImpl.java @@ -479,7 +479,7 @@ public class ResourceManagerImpl * * @param resource resource to refresh * @param encoding character encoding of the resource to refresh. - * + * @return resource * @throws ResourceNotFoundException if template not found from current source for this Resource * @throws ParseErrorException if template cannot be parsed due to syntax (or other) error. */ diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/loader/DataSourceResourceLoader.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/loader/DataSourceResourceLoader.java index 853b93e8..6e9db6ff 100644 --- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/loader/DataSourceResourceLoader.java +++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/loader/DataSourceResourceLoader.java @@ -499,6 +499,7 @@ public class DataSourceResourceLoader extends ResourceLoader * @param tableName table to fetch from * @param keyColumn column whose value should match templateName * @return PreparedStatement + * @throws SQLException */ protected PreparedStatement prepareStatement( final Connection conn, @@ -531,6 +532,11 @@ public class DataSourceResourceLoader extends ResourceLoader /** * Gets a reader from a result set's column + * @param resultSet + * @param column + * @param encoding + * @return reader + * @throws SQLException */ protected Reader getReader(ResultSet resultSet, String column, String encoding) throws SQLException diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/loader/JarHolder.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/loader/JarHolder.java index b7b34236..f112a397 100644 --- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/loader/JarHolder.java +++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/loader/JarHolder.java @@ -51,6 +51,7 @@ public class JarHolder /** * @param rs * @param urlpath + * @param log */ public JarHolder( RuntimeServices rs, String urlpath, Logger log ) { diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/loader/JarResourceLoader.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/loader/JarResourceLoader.java index bd36f712..f7ae8f2d 100644 --- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/loader/JarResourceLoader.java +++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/loader/JarResourceLoader.java @@ -45,17 +45,16 @@ import java.util.Map; * The configuration of the JarResourceLoader is straightforward - * You simply add the JarResourceLoader to the configuration via * </p> - * <p><pre> + * <pre><code> * resource.loaders = jar * resource.loader.jar.class = org.apache.velocity.runtime.resource.loader.JarResourceLoader * resource.loader.jar.path = list of JAR <URL>s - * </pre></p> + * </code></pre> * - * <p> So for example, if you had a jar file on your local filesystem, you could simply do - * <pre> + * <p> So for example, if you had a jar file on your local filesystem, you could simply do</p> + * <pre><code> * resource.loader.jar.path = jar:file:/opt/myfiles/jar1.jar - * </pre> - * </p> + * </code></pre> * <p> Note that jar specification for the <code>.path</code> configuration property * conforms to the same rules for the java.net.JarUrlConnection class. * </p> diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/loader/ResourceLoader.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/loader/ResourceLoader.java index e2fc7b43..9a2d5643 100644 --- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/loader/ResourceLoader.java +++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/loader/ResourceLoader.java @@ -142,6 +142,7 @@ public abstract class ResourceLoader * to create a template. * * @param source + * @param encoding * @return The reader for the requested resource. * @throws ResourceNotFoundException * @since 2.0 @@ -277,7 +278,8 @@ public abstract class ResourceLoader * @param rawStream The raw input stream. * @param encoding The asked encoding. * @return found reader - * @throws IOException, UnsupportedEncodingException + * @throws IOException + * @throws UnsupportedEncodingException * @since 2.0 */ protected Reader buildReader(InputStream rawStream, String encoding) diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/loader/StringResourceLoader.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/loader/StringResourceLoader.java index 9603f826..98c47934 100644 --- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/loader/StringResourceLoader.java +++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/loader/StringResourceLoader.java @@ -75,17 +75,17 @@ import java.util.Map; * <pre><code> * StringResourceRepository repo = StringResourceLoader.getRepository("foo"); * </code></pre> - * and add string resources to the repo just as in the previous example. + * <p>and add string resources to the repo just as in the previous example. * </p> * <p>If you have concerns about memory leaks or for whatever reason do not wish * to have your string repository stored statically as a class member, then you * should set 'resource.loader.string.repository.static = false' in your properties. * This will tell the resource loader that the string repository should be stored - * in the Velocity application attributes. To retrieve the repository, do: + * in the Velocity application attributes. To retrieve the repository, do:</p> * <pre><code> * StringResourceRepository repo = velocityEngine.getApplicationAttribute("foo"); * </code></pre> - * If you did not specify a name for the repository, then it will be stored under the + * <p>If you did not specify a name for the repository, then it will be stored under the * class name of the repository implementation class (for which the default is * 'org.apache.velocity.runtime.resource.util.StringResourceRepositoryImpl'). * Incidentally, this is also true for the default statically stored repository. @@ -98,13 +98,13 @@ import java.util.Map; * repo.magicallyAddSomeStringResources(); * StringResourceLoader.setRepository("foo", repo); * </code></pre> - * Or for a non-static repository: + * <p>Or for a non-static repository:</p> * <pre><code> * StringResourceRepository repo = new MyStringResourceRepository(); * repo.magicallyAddSomeStringResources(); * velocityEngine.setApplicationAttribute("foo", repo); * </code></pre> - * Then, assuming the 'resource.loader.string.repository.name' property is + * <p>Then, assuming the 'resource.loader.string.repository.name' property is * set to 'some.name', the StringResourceLoader will use that already created * repository, rather than creating a new one. * </p> @@ -157,6 +157,7 @@ public class StringResourceLoader extends ResourceLoader /** * Returns a reference to the default static repository. + * @return default static repository */ public static StringResourceRepository getRepository() { @@ -166,6 +167,8 @@ public class StringResourceLoader extends ResourceLoader /** * Returns a reference to the repository stored statically under the * specified name. + * @param name + * @return named repository * @since 1.6 */ public static StringResourceRepository getRepository(String name) @@ -176,6 +179,8 @@ public class StringResourceLoader extends ResourceLoader /** * Sets the specified {@link StringResourceRepository} in static storage * under the specified name. + * @param name + * @param repo * @since 1.6 */ public static void setRepository(String name, StringResourceRepository repo) @@ -186,6 +191,8 @@ public class StringResourceLoader extends ResourceLoader /** * Removes the {@link StringResourceRepository} stored under the specified * name. + * @param name + * @return removed repository * @since 1.6 */ public static StringResourceRepository removeRepository(String name) @@ -203,11 +210,14 @@ public class StringResourceLoader extends ResourceLoader } - // the repository used internally by this resource loader + /** + * the repository used internally by this resource loader + */ protected StringResourceRepository repository; /** + * @param configuration * @see ResourceLoader#init(org.apache.velocity.util.ExtProperties) */ public void init(final ExtProperties configuration) @@ -278,6 +288,9 @@ public class StringResourceLoader extends ResourceLoader } /** + * @param className + * @param encoding + * @return created repository * @since 1.6 */ public StringResourceRepository createRepository(final String className, @@ -318,6 +331,8 @@ public class StringResourceLoader extends ResourceLoader /** * Overrides superclass for better performance. + * @param name resource name + * @return whether resource exists * @since 1.6 */ public boolean resourceExists(final String name) @@ -379,6 +394,8 @@ public class StringResourceLoader extends ResourceLoader } /** + * @param resource + * @return whether resource was modified * @see ResourceLoader#isSourceModified(org.apache.velocity.runtime.resource.Resource) */ public boolean isSourceModified(final Resource resource) @@ -397,6 +414,8 @@ public class StringResourceLoader extends ResourceLoader } /** + * @param resource + * @return last modified timestamp * @see ResourceLoader#getLastModified(org.apache.velocity.runtime.resource.Resource) */ public long getLastModified(final Resource resource) diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/loader/URLResourceLoader.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/loader/URLResourceLoader.java index f60e4c59..f5eac4a5 100644 --- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/loader/URLResourceLoader.java +++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/loader/URLResourceLoader.java @@ -48,6 +48,7 @@ public class URLResourceLoader extends ResourceLoader private int timeout = -1; /** + * @param configuration * @see ResourceLoader#init(org.apache.velocity.util.ExtProperties) */ public void init(ExtProperties configuration) @@ -200,6 +201,7 @@ public class URLResourceLoader extends ResourceLoader /** * Returns the current, custom timeout setting. If negative, there is no custom timeout. + * @return timeout * @since 1.6 */ public int getTimeout() diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/util/StringResource.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/util/StringResource.java index ffb4d25e..e0887eb6 100644 --- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/util/StringResource.java +++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/util/StringResource.java @@ -42,6 +42,7 @@ public final class StringResource /** * convenience constructor; sets body to 'body' and sets lastModified to now * @param body + * @param encoding */ public StringResource(final String body, final String encoding) { |