Modified: velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/exception/MethodInvocationException.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/exception/MethodInvocationException.java?rev=1780307&r1=1780306&r2=1780307&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/exception/MethodInvocationException.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/exception/MethodInvocationException.java Thu Jan 26 01:57:00 2017 @@ -42,7 +42,7 @@ public class MethodInvocationException e private String referenceName = ""; private final String methodName; - + private final int lineNumber; private final int columnNumber; private final String templateName;
Modified: velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/exception/ParseErrorException.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/exception/ParseErrorException.java?rev=1780307&r1=1780306&r2=1780307&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/exception/ParseErrorException.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/exception/ParseErrorException.java Thu Jan 26 01:57:00 2017 @@ -16,7 +16,7 @@ package org.apache.velocity.exception; * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License. */ import org.apache.velocity.runtime.parser.ParseException; @@ -64,7 +64,7 @@ public class ParseErrorException extends * If applicable, contains the invalid syntax or reference that triggered this exception */ private String invalidSyntax; - + /** * If we modify the message, then we set this */ @@ -81,7 +81,7 @@ public class ParseErrorException extends } private static final Pattern lexError = Pattern.compile("Lexical error.*TokenMgrError.*line (\\d+),.*column (\\d+)\\.(.*)"); - + /** * Create a ParseErrorException with the given ParseException. * @@ -91,7 +91,7 @@ public class ParseErrorException extends public ParseErrorException(ParseException pex, String templName) { super(pex.getMessage()); - + if (templName != null) templateName = templName; // Don't use a second C'tor, TemplateParseException is a subclass of @@ -105,20 +105,20 @@ public class ParseErrorException extends templateName = xpex.getTemplateName(); } else - { + { // We get here if the the Parser has thrown an exception. Unfortunately, // the error message created is hard coded by javacc, so here we alter - // the error message, so that it is in our standard format. + // the error message, so that it is in our standard format. Matcher match = lexError.matcher(pex.getMessage()); if (match.matches()) { lineNumber = Integer.parseInt(match.group(1)); columnNumber = Integer.parseInt(match.group(2)); String restOfMsg = match.group(3); - msg = "Lexical error, " + restOfMsg + " at " + msg = "Lexical error, " + restOfMsg + " at " + StringUtils.formatFileString(templateName, lineNumber, columnNumber); } - + // ugly, ugly, ugly... if (pex.currentToken != null && pex.currentToken.next != null) @@ -138,7 +138,7 @@ public class ParseErrorException extends public ParseErrorException(VelocityException pex, String templName) { super(pex.getMessage()); - + if (templName != null) templateName = templName; // Don't use a second C'tor, TemplateParseException is a subclass of @@ -166,7 +166,7 @@ public class ParseErrorException extends /** * Create a ParseErrorRuntimeException with the given message and info - * + * * @param exceptionMessage the error exception message * @param info an Info object with the current template info * @since 1.5 @@ -176,26 +176,26 @@ public class ParseErrorException extends super(exceptionMessage); columnNumber = info.getColumn(); lineNumber = info.getLine(); - templateName = info.getTemplateName(); - } + templateName = info.getTemplateName(); + } /** * Create a ParseErrorRuntimeException with the given message and info - * + * * @param exceptionMessage the error exception message * @param info an Info object with the current template info * @param invalidSyntax the invalid syntax or reference triggering this exception * @since 1.5 */ - public ParseErrorException(String exceptionMessage, + public ParseErrorException(String exceptionMessage, Info info, String invalidSyntax) { super(exceptionMessage); columnNumber = info.getColumn(); lineNumber = info.getLine(); - templateName = info.getTemplateName(); - this.invalidSyntax = invalidSyntax; - } + templateName = info.getTemplateName(); + this.invalidSyntax = invalidSyntax; + } /** @@ -236,7 +236,7 @@ public class ParseErrorException extends /** * Return the invalid syntax or reference that triggered this error, or null * if not defined. - * + * * @return Return the invalid syntax or reference that triggered this error, or null * if not defined * @since 1.5 Modified: velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/exception/ResourceNotFoundException.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/exception/ResourceNotFoundException.java?rev=1780307&r1=1780306&r2=1780307&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/exception/ResourceNotFoundException.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/exception/ResourceNotFoundException.java Thu Jan 26 01:57:00 2017 @@ -16,7 +16,7 @@ package org.apache.velocity.exception; * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License. */ /** Modified: velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/exception/TemplateInitException.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/exception/TemplateInitException.java?rev=1780307&r1=1780306&r2=1780307&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/exception/TemplateInitException.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/exception/TemplateInitException.java Thu Jan 26 01:57:00 2017 @@ -16,7 +16,7 @@ package org.apache.velocity.exception; * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License. */ import org.apache.velocity.runtime.parser.ParseException; @@ -29,19 +29,19 @@ import org.apache.velocity.runtime.parse * @version $Id$ * @since 1.5 */ -public class TemplateInitException extends VelocityException +public class TemplateInitException extends VelocityException implements ExtendedParseException { private final String templateName; private final int col; private final int line; - + /** * Version Id for serializable */ private static final long serialVersionUID = -4985224672336070621L; - public TemplateInitException(final String msg, + public TemplateInitException(final String msg, final String templateName, final int col, final int line) { super(msg); @@ -86,7 +86,7 @@ public class TemplateInitException exten return col; } - - - + + + } Modified: velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/exception/VelocityException.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/exception/VelocityException.java?rev=1780307&r1=1780306&r2=1780307&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/exception/VelocityException.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/exception/VelocityException.java Thu Jan 26 01:57:00 2017 @@ -16,12 +16,12 @@ package org.apache.velocity.exception; * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License. */ /** -* Base class for Velocity runtime exceptions thrown to the - * application layer. +* Base class for Velocity runtime exceptions thrown to the + * application layer. * * @author <a href="mailto:kdow...@amberarcher.com">Kyle F. Downey</a> * @version $Id$ Modified: velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/io/Filter.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/io/Filter.java?rev=1780307&r1=1780306&r2=1780307&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/io/Filter.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/io/Filter.java Thu Jan 26 01:57:00 2017 @@ -16,7 +16,7 @@ package org.apache.velocity.io; * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License. */ import java.io.IOException; Modified: velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/io/VelocityWriter.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/io/VelocityWriter.java?rev=1780307&r1=1780306&r2=1780307&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/io/VelocityWriter.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/io/VelocityWriter.java Thu Jan 26 01:57:00 2017 @@ -16,7 +16,7 @@ package org.apache.velocity.io; * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License. */ import java.io.IOException; @@ -51,7 +51,7 @@ public final class VelocityWriter extend public static final int UNBOUNDED_BUFFER = -2; private Writer writer = null; - + private int bufferSize; private boolean autoFlush; @@ -333,15 +333,15 @@ public final class VelocityWriter extend this.writer = writer; clear(); } - + /** * Send the content of a reference, e.g.; $foo, to the writer. * The default implementation is to call the wrapped Writer's - * write(String) method. + * write(String) method. */ public void writeReference(String ref) throws IOException { write(ref); } - + } Modified: velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/ParserPool.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/ParserPool.java?rev=1780307&r1=1780306&r2=1780307&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/ParserPool.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/ParserPool.java Thu Jan 26 01:57:00 2017 @@ -16,7 +16,7 @@ package org.apache.velocity.runtime; * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License. */ import org.apache.velocity.runtime.parser.Parser; Modified: velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/ParserPoolImpl.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/ParserPoolImpl.java?rev=1780307&r1=1780306&r2=1780307&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/ParserPoolImpl.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/ParserPoolImpl.java Thu Jan 26 01:57:00 2017 @@ -16,7 +16,7 @@ package org.apache.velocity.runtime; * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License. */ import org.apache.velocity.runtime.parser.CharStream; Modified: velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeInstance.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeInstance.java?rev=1780307&r1=1780306&r2=1780307&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeInstance.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeInstance.java Thu Jan 26 01:57:00 2017 @@ -227,11 +227,11 @@ public class RuntimeInstance implements { log.debug("Initializing Velocity, Calling init()..."); initializing = true; - + log.trace("*****************************"); log.debug("Starting Apache Velocity v2.0"); log.trace("RuntimeInstance initializing."); - + initializeProperties(); initializeSelfProperties(); initializeLog(); @@ -239,7 +239,7 @@ public class RuntimeInstance implements initializeDirectives(); initializeEventHandlers(); initializeParserPool(); - + initializeIntrospection(); initializeEvaluateScopeSettings(); /* @@ -247,9 +247,9 @@ public class RuntimeInstance implements * accessible from Runtime, so keep this here at the end. */ vmFactory.initVelocimacro(); - + log.trace("RuntimeInstance successfully initialized."); - + initialized = true; initializing = false; } Modified: velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeServices.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeServices.java?rev=1780307&r1=1780306&r2=1780307&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeServices.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeServices.java Thu Jan 26 01:57:00 2017 @@ -16,7 +16,7 @@ package org.apache.velocity.runtime; * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License. */ import org.apache.velocity.Template; Modified: velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/VelocimacroManager.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/VelocimacroManager.java?rev=1780307&r1=1780306&r2=1780307&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/VelocimacroManager.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/VelocimacroManager.java Thu Jan 26 01:57:00 2017 @@ -16,7 +16,7 @@ package org.apache.velocity.runtime; * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License. */ import org.apache.velocity.Template; @@ -55,7 +55,7 @@ public class VelocimacroManager /** set of names of library tempates/namespaces */ private final Map libraries = new ConcurrentHashMap(17, 0.5f, 20); - + private RuntimeServices rsvc = null; /* @@ -81,9 +81,9 @@ public class VelocimacroManager /** * Adds a VM definition to the cache. - * + * * Called by VelocimacroFactory.addVelociMacro (after parsing and discovery in Macro directive) - * + * * @param vmName Name of the new VelociMacro. * @param macroBody String representation of the macro body. * @param macroArgs Array of macro arguments, containing the @@ -105,7 +105,7 @@ public class VelocimacroManager MacroEntry me = new MacroEntry(vmName, macroBody, macroArgs, definingTemplate.getName(), rsvc); me.setFromLibrary(registerFromLib); - + /* * the client (VMFactory) will signal to us via * registerFromLib that we are in startup mode registering @@ -116,7 +116,7 @@ public class VelocimacroManager boolean isLib = true; MacroEntry exist = (MacroEntry) globalNamespace.get(vmName); - + if (registerFromLib) { libraries.put(definingTemplate.getName(), definingTemplate); @@ -295,7 +295,7 @@ public class VelocimacroManager return null; } - + /** * @since 1.6 */ @@ -333,7 +333,7 @@ public class VelocimacroManager vp.setLocation(macro.getLine(), macro.getColumn(), macro.getTemplate()); vp.init(rsvc); } - + /** * Has the macro been registered from a library. * @param fromLibrary True if the macro was registered from a Library. @@ -363,5 +363,3 @@ public class VelocimacroManager } } } - - Modified: velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/BlockMacro.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/BlockMacro.java?rev=1780307&r1=1780306&r2=1780307&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/BlockMacro.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/BlockMacro.java Thu Jan 26 01:57:00 2017 @@ -16,7 +16,7 @@ package org.apache.velocity.runtime.dire * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License. */ import org.apache.velocity.context.InternalContextAdapter; @@ -31,13 +31,13 @@ import java.io.Writer; /** * BlockMacro directive is used to invoke Velocity macros with normal parameters and a macro body. * <p> - * The macro can then refer to the passed body AST. This directive can be used as a + * The macro can then refer to the passed body AST. This directive can be used as a * "decorator". Body AST can contain any valid Velocity syntax. * * An example: * <pre> * #set($foobar = "yeah!") - * + * * #macro(strong $txt) * <strong>$bodyContent</strong> $txt * #end @@ -50,7 +50,7 @@ import java.io.Writer; * <pre> * <strong><u>This text is underlined and bold<u></strong> yeah! * </pre> - * + * * bodyContent reference name is configurable (see velocity.properties). * * @author <a href="mailto:w...@removethis.sci.fi">Jarkko Viinamaki</a> @@ -79,7 +79,7 @@ public class BlockMacro extends Block /** * Initializes the directive. - * + * * @param rs * @param context * @param node Modified: velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Break.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Break.java?rev=1780307&r1=1780306&r2=1780307&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Break.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Break.java Thu Jan 26 01:57:00 2017 @@ -16,7 +16,7 @@ package org.apache.velocity.runtime.dire * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License. */ import org.apache.velocity.context.InternalContextAdapter; @@ -102,7 +102,7 @@ public class Break extends Directive + StringUtils.formatFileString(this)); } } - + /** * Called by the parser to validate the argument types */ @@ -114,6 +114,6 @@ public class Break extends Directive throw new MacroParseException("The #break directive takes only a single, optional Scope argument", templateName, t); } - } - + } + } Modified: velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Define.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Define.java?rev=1780307&r1=1780306&r2=1780307&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Define.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Define.java Thu Jan 26 01:57:00 2017 @@ -16,7 +16,7 @@ package org.apache.velocity.runtime.dire * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License. */ import org.apache.velocity.context.InternalContextAdapter; @@ -66,7 +66,7 @@ public class Define extends Block throw new VelocityException("parameter missing: block name at " + StringUtils.formatFileString(this)); } - + /* * first token is the name of the block. We don't even check the format, * just assume it looks like this: $block_name. Should we check if it has @@ -99,17 +99,17 @@ public class Define extends Block */ public void checkArgs(ArrayList<Integer> argtypes, Token t, String templateName) throws ParseException - { + { if (argtypes.size() != 1) { throw new MacroParseException("The #define directive requires one argument", templateName, t); } - + if (argtypes.get(0) == ParserTreeConstants.JJTWORD) { throw new MacroParseException("The argument to #define is of the wrong type", - templateName, t); + templateName, t); } } } Modified: velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/DirectiveConstants.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/DirectiveConstants.java?rev=1780307&r1=1780306&r2=1780307&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/DirectiveConstants.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/DirectiveConstants.java Thu Jan 26 01:57:00 2017 @@ -16,7 +16,7 @@ package org.apache.velocity.runtime.dire * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License. */ /** Modified: velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Evaluate.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Evaluate.java?rev=1780307&r1=1780306&r2=1780307&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Evaluate.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Evaluate.java Thu Jan 26 01:57:00 2017 @@ -16,7 +16,7 @@ package org.apache.velocity.runtime.dire * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License. */ import org.apache.velocity.Template; @@ -80,44 +80,44 @@ public class Evaluate extends Directive /** * Check that there is exactly one argument and it is a string or reference. - */ - + */ + int argCount = node.jjtGetNumChildren(); if (argCount == 0) { throw new TemplateInitException( - "#" + getName() + "() requires exactly one argument", + "#" + getName() + "() requires exactly one argument", context.getCurrentTemplateName(), node.getColumn(), - node.getLine()); + node.getLine()); } if (argCount > 1) { - /* + /* * use line/col of second argument */ - + throw new TemplateInitException( - "#" + getName() + "() requires exactly one argument", + "#" + getName() + "() requires exactly one argument", context.getCurrentTemplateName(), node.jjtGetChild(1).getColumn(), node.jjtGetChild(1).getLine()); } - + Node childNode = node.jjtGetChild(0); if ( childNode.getType() != ParserTreeConstants.JJTSTRINGLITERAL && childNode.getType() != ParserTreeConstants.JJTREFERENCE ) { throw new TemplateInitException( - "#" + getName() + "() argument must be a string literal or reference", + "#" + getName() + "() argument must be a string literal or reference", context.getCurrentTemplateName(), childNode.getColumn(), childNode.getLine()); } } - + /** - * Evaluate the argument, convert to a String, and evaluate again + * Evaluate the argument, convert to a String, and evaluate again * (with the same context). * @param context * @param writer @@ -125,7 +125,7 @@ public class Evaluate extends Directive * @return True if the directive rendered successfully. * @throws IOException * @throws ResourceNotFoundException - * @throws ParseErrorException + * @throws ParseErrorException * @throws MethodInvocationException */ public boolean render(InternalContextAdapter context, Writer writer, @@ -137,18 +137,18 @@ public class Evaluate extends Directive * Evaluate the string with the current context. We know there is * exactly one argument and it is a string or reference. */ - + Object value = node.jjtGetChild(0).value( context ); String sourceText; if ( value != null ) { sourceText = value.toString(); - } + } else { sourceText = ""; } - + /* * The new string needs to be parsed since the text has been dynamically generated. */ @@ -198,7 +198,7 @@ public class Evaluate extends Directive throw new ParseErrorException( pex.getMessage(), info ); } - try + try { preRender(context); Modified: velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Foreach.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Foreach.java?rev=1780307&r1=1780306&r2=1780307&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Foreach.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Foreach.java Thu Jan 26 01:57:00 2017 @@ -16,7 +16,7 @@ package org.apache.velocity.runtime.dire * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License. */ import org.apache.velocity.context.InternalContextAdapter; @@ -116,14 +116,14 @@ public class Foreach extends Directive } skipInvalidIterator = rsvc.getBoolean(RuntimeConstants.SKIP_INVALID_ITERATOR, true); - + if (rsvc.getBoolean(RuntimeConstants.RUNTIME_REFERENCES_STRICT, false)) { // If we are in strict mode then the default for skipInvalidItarator // is true. However, if the property is explicitly set, then honor the setting. skipInvalidIterator = rsvc.getBoolean(RuntimeConstants.SKIP_INVALID_ITERATOR, false); } - + /* * this is really the only thing we can do here as everything * else is context sensitive @@ -141,11 +141,11 @@ public class Foreach extends Directive */ elementKey = sn.getFirstTokenImage().substring(1); } - + /* * make an uberinfo - saves new's later on */ - + uberInfo = new Info(this.getTemplateName(), getLine(),getColumn()); } @@ -224,7 +224,7 @@ public class Foreach extends Directive // Get the block ast tree which is always the last child Node block = node.jjtGetChild(node.jjtGetNumChildren()-1); - + /* * save the element key if there is one */ @@ -307,7 +307,7 @@ public class Foreach extends Directive // clean up after the ForeachScope postRender(context); } - + /** * We do not allow a word token in any other arg position except for the 2nd since * we are looking for the pattern #foreach($foo in $bar). @@ -317,23 +317,23 @@ public class Foreach extends Directive { if (argtypes.size() < 3) { - throw new MacroParseException("Too few arguments to the #foreach directive", + throw new MacroParseException("Too few arguments to the #foreach directive", templateName, t); - } + } else if (argtypes.get(0) != ParserTreeConstants.JJTREFERENCE) { throw new MacroParseException("Expected argument 1 of #foreach to be a reference", templateName, t); - } + } else if (argtypes.get(1) != ParserTreeConstants.JJTWORD) { throw new MacroParseException("Expected word 'in' at argument position 2 in #foreach", templateName, t); - } + } else if (argtypes.get(2) == ParserTreeConstants.JJTWORD) { throw new MacroParseException("Argument 3 of #foreach is of the wrong type", templateName, t); } - } + } } Modified: velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/ForeachScope.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/ForeachScope.java?rev=1780307&r1=1780306&r2=1780307&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/ForeachScope.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/ForeachScope.java Thu Jan 26 01:57:00 2017 @@ -16,7 +16,7 @@ package org.apache.velocity.runtime.dire * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License. */ /** Modified: velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Include.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Include.java?rev=1780307&r1=1780306&r2=1780307&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Include.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Include.java Thu Jan 26 01:57:00 2017 @@ -16,7 +16,7 @@ package org.apache.velocity.runtime.dire * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License. */ import org.apache.velocity.app.event.EventHandlerUtil; @@ -167,7 +167,7 @@ public class Include extends InputBase } else { - String msg = "invalid #include() argument '" + String msg = "invalid #include() argument '" + n.toString() + "' at " + StringUtils.formatFileString(this); log.error(msg); outputErrorToStream( writer, "error with arg " + i Modified: velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/InputBase.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/InputBase.java?rev=1780307&r1=1780306&r2=1780307&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/InputBase.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/InputBase.java Thu Jan 26 01:57:00 2017 @@ -16,7 +16,7 @@ package org.apache.velocity.runtime.dire * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License. */ import org.apache.velocity.context.InternalContextAdapter; Modified: velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Macro.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Macro.java?rev=1780307&r1=1780306&r2=1780307&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Macro.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Macro.java Thu Jan 26 01:57:00 2017 @@ -16,7 +16,7 @@ package org.apache.velocity.runtime.dire * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License. */ import org.apache.velocity.context.InternalContextAdapter; @@ -110,20 +110,20 @@ public class Macro extends Directive { super.init(rs, context, node); - - // Add this macro to the VelocimacroManager now that it has been initialized. + + // Add this macro to the VelocimacroManager now that it has been initialized. List<MacroArg> macroArgs = getArgArray(node, rsvc); int numArgs = node.jjtGetNumChildren(); rsvc.addVelocimacro(macroArgs.get(0).name, node.jjtGetChild(numArgs - 1), macroArgs, node.getTemplate()); } - + /** * Check the argument types of a macro call, called by the parser to do validation */ public void checkArgs(ArrayList<Integer> argtypes, Token t, String templateName) throws ParseException - { + { if (argtypes.size() < 1) { throw new MacroParseException("A macro definition requires at least a macro name" @@ -140,12 +140,12 @@ public class Macro extends Directive , templateName, t); } - + // We use this to flag if the default arguments are out of order. such as // #macro($a $b=1 $c). We enforce that all default parameters must be // specified consecutively, and at the end of the argument list. boolean consecutive = false; - + // All arguments other then the first must be either a reference // or a directiveassign followed by a reference in the case a default // value is specified. @@ -153,8 +153,8 @@ public class Macro extends Directive { if (argtypes.get(argPos) == ParserTreeConstants.JJTDIRECTIVEASSIGN) { - // Abosrb next argument type since parser enforces that these are in - // pairs, and we don't need to check the type of the second + // Abosrb next argument type since parser enforces that these are in + // pairs, and we don't need to check the type of the second // arg becuase it is done by the parser. argPos++; consecutive = true; @@ -168,7 +168,7 @@ public class Macro extends Directive { // We have already found a default parameter e.g.; $x = 2, but // the next parameter was not a reference. - throw new MacroParseException("Macro non-default argument follows a default argument at " + throw new MacroParseException("Macro non-default argument follows a default argument at " , templateName, t); } } @@ -195,7 +195,7 @@ public class Macro extends Directive numArgs--; // avoid the block tree... ArrayList<MacroArg> macroArgs = new ArrayList(); - + for (int i = 0; i < numArgs; i++) { Node curnode = node.jjtGetChild(i); @@ -204,7 +204,7 @@ public class Macro extends Directive { // This is an argument with a default value macroArg.name = curnode.getFirstTokenImage(); - + // Inforced by the parser there will be an argument here. i++; curnode = node.jjtGetChild(i); @@ -215,17 +215,17 @@ public class Macro extends Directive // An argument without a default value macroArg.name = curnode.getFirstTokenImage(); } - + // trim off the leading $ for the args after the macro name. // saves everyone else from having to do it if (i > 0 && macroArg.name.startsWith("$")) { macroArg.name = macroArg.name.substring(1, macroArg.name.length()); } - + macroArgs.add(macroArg); } - + if (debugMode) { StringBuffer msg = new StringBuffer("Macro.getArgArray() : nbrArgs="); @@ -236,24 +236,24 @@ public class Macro extends Directive return macroArgs; } - + /** - * MacroArgs holds the information for a single argument in a + * MacroArgs holds the information for a single argument in a * macro definition. The arguments for a macro are passed around as a * list of these objects. */ public static class MacroArg { /** - * Name of the argument with '$' stripped off + * Name of the argument with '$' stripped off */ - public String name = null; - + public String name = null; + /** * If the argument was given a default value, then this contains * the base of the AST tree of the value. Otherwise it is null. */ - public Node defaultVal = null; + public Node defaultVal = null; } /** @@ -284,6 +284,6 @@ public class Macro extends Directive } ret.append(" )"); return ret; - } - + } + } Modified: velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/MacroParseException.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/MacroParseException.java?rev=1780307&r1=1780306&r2=1780307&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/MacroParseException.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/MacroParseException.java Thu Jan 26 01:57:00 2017 @@ -16,7 +16,7 @@ package org.apache.velocity.runtime.dire * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License. */ import org.apache.velocity.exception.ExtendedParseException; Modified: velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Parse.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Parse.java?rev=1780307&r1=1780306&r2=1780307&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Parse.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Parse.java Thu Jan 26 01:57:00 2017 @@ -16,7 +16,7 @@ package org.apache.velocity.runtime.dire * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License. */ import org.apache.velocity.Template; @@ -67,12 +67,12 @@ import java.util.List; public class Parse extends InputBase { private int maxDepth; - + /** * Indicates if we are running in strict reference mode. */ - public boolean strictRef = false; - + public boolean strictRef = false; + /** * Return name of this directive. * @return The name of this directive. @@ -114,8 +114,8 @@ public class Parse extends InputBase super.init(rs, context, node); this.maxDepth = rsvc.getInt(RuntimeConstants.PARSE_DIRECTIVE_MAXDEPTH, 10); - - strictRef = rsvc.getBoolean(RuntimeConstants.RUNTIME_REFERENCES_STRICT, false); + + strictRef = rsvc.getBoolean(RuntimeConstants.RUNTIME_REFERENCES_STRICT, false); } /** @@ -186,7 +186,7 @@ public class Parse extends InputBase if (maxDepth > 0) { - /* + /* * see if we have exceeded the configured depth. */ String[] templateStack = context.getTemplateNameStack(); @@ -199,7 +199,7 @@ public class Parse extends InputBase } log.error("Max recursion depth reached ({}) File stack: {}", templateStack.length, path); - + return false; } } @@ -317,7 +317,7 @@ public class Parse extends InputBase return true; } - + /** * Called by the parser to validate the argument types */ @@ -329,12 +329,11 @@ public class Parse extends InputBase throw new MacroParseException("The #parse directive requires one argument", templateName, t); } - + if (argtypes.get(0) == ParserTreeConstants.JJTWORD) { throw new MacroParseException("The argument to #parse is of the wrong type", - templateName, t); + templateName, t); } } } - Modified: velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Scope.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Scope.java?rev=1780307&r1=1780306&r2=1780307&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Scope.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Scope.java Thu Jan 26 01:57:00 2017 @@ -16,7 +16,7 @@ package org.apache.velocity.runtime.dire * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License. */ import org.apache.velocity.Template; Modified: velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Stop.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Stop.java?rev=1780307&r1=1780306&r2=1780307&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Stop.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Stop.java Thu Jan 26 01:57:00 2017 @@ -16,7 +16,7 @@ package org.apache.velocity.runtime.dire * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License. */ import org.apache.velocity.context.InternalContextAdapter; @@ -48,7 +48,7 @@ public class Stop extends Directive { return "stop"; } - + /** * Return type of this directive. * @return The type of this directive. @@ -73,7 +73,7 @@ public class Stop extends Directive hasMessage = (node.jjtGetNumChildren() == 1); } - + @Override public boolean render(InternalContextAdapter context, Writer writer, Node node) { @@ -87,7 +87,7 @@ public class Stop extends Directive // stop all and use specified message throw new StopCommand(String.valueOf(argument)); } - + /** * Called by the parser to check the argument types */ @@ -100,6 +100,6 @@ public class Stop extends Directive throw new MacroParseException("The #stop directive only accepts a single message parameter", templateName, t); } - } + } } Modified: velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/StopCommand.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/StopCommand.java?rev=1780307&r1=1780306&r2=1780307&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/StopCommand.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/StopCommand.java Thu Jan 26 01:57:00 2017 @@ -16,7 +16,7 @@ package org.apache.velocity.runtime.dire * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License. */ import org.apache.velocity.Template; Modified: velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/VelocimacroProxy.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/VelocimacroProxy.java?rev=1780307&r1=1780306&r2=1780307&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/VelocimacroProxy.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/VelocimacroProxy.java Thu Jan 26 01:57:00 2017 @@ -16,7 +16,7 @@ package org.apache.velocity.runtime.dire * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License. */ import org.apache.velocity.context.InternalContextAdapter; @@ -73,7 +73,7 @@ public class VelocimacroProxy extends Di /** * sets the directive name of this VM - * + * * @param name */ public void setName(String name) @@ -89,7 +89,7 @@ public class VelocimacroProxy extends Di public void setMacroArgs(List<Macro.MacroArg> args) { macroArgs = args; - + // for performance reasons we precache these strings - they are needed in // "render literal if null" functionality literalArgArray = new String[macroArgs.size()]; @@ -113,7 +113,7 @@ public class VelocimacroProxy extends Di { return macroArgs; } - + /** * @param tree */ @@ -124,7 +124,7 @@ public class VelocimacroProxy extends Di /** * returns the number of ars needed for this VM - * + * * @return The number of ars needed for this VM */ public int getNumArgs() @@ -139,7 +139,7 @@ public class VelocimacroProxy extends Di { rsvc = rs; log = rs.getLog("macro"); - + strictArguments = rsvc.getBoolean( RuntimeConstants.VM_ARGUMENTS_STRICT, false); @@ -158,7 +158,7 @@ public class VelocimacroProxy extends Di /** * Renders the macro using the context. - * + * * @param context Current rendering context * @param writer Writer for output * @param node AST that calls the macro @@ -171,8 +171,8 @@ public class VelocimacroProxy extends Di throws IOException { int callArgNum = node.jjtGetNumChildren(); - - // if this macro was invoked by a call directive, we might have a body AST here. + + // if this macro was invoked by a call directive, we might have a body AST here. Object oldBodyRef = null; if (body != null) { @@ -241,7 +241,7 @@ public class VelocimacroProxy extends Di } } } - + /** * Check whether the number of arguments given matches the number defined. */ @@ -252,7 +252,7 @@ public class VelocimacroProxy extends Di { if (strictArguments) { - throw new VelocityException("Provided " + callArgNum + " arguments but macro #" + throw new VelocityException("Provided " + callArgNum + " arguments but macro #" + macroArgs.get(0).name + " accepts at most " + (macroArgs.size()-1) + " at " + StringUtils.formatFileString(node)); } @@ -286,7 +286,7 @@ public class VelocimacroProxy extends Di } out.append(" at " + StringUtils.formatFileString(this)); log.error(out.toString()); - + // clean out the macro stack, since we just broke it while (context.getCurrentMacroCallDepth() > 0) { @@ -306,7 +306,7 @@ public class VelocimacroProxy extends Di { // Changed two dimensional array to single dimensional to optimize memory lookups Object[] values = new Object[macroArgs.size() * 2]; - + // Move arguments into the macro's context. Start at one to skip macro name for (int i = 1; i < macroArgs.size(); i++) { @@ -354,6 +354,5 @@ public class VelocimacroProxy extends Di // return the array of replaced and new values return values; } - -} +} Modified: velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/contrib/For.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/contrib/For.java?rev=1780307&r1=1780306&r2=1780307&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/contrib/For.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/contrib/For.java Thu Jan 26 01:57:00 2017 @@ -39,7 +39,7 @@ import java.util.ArrayList; * that tracks the loop iterations. e.g.; #for($user in $users index $i). * As $user iterates through $users the index reference $i will be equal to * 0, 1, 2, etc.. - * @see org.apache.velocity.runtime.directive.Foreach + * @see org.apache.velocity.runtime.directive.Foreach */ public class For extends Foreach { @@ -59,7 +59,7 @@ public class For extends Foreach public void init(RuntimeServices rs, InternalContextAdapter context, Node node) throws TemplateInitException { - super.init(rs, context, node); + super.init(rs, context, node); // If we have more then 3 argument then the user has specified an // index value, i.e.; #foreach($a in $b index $c) if (node.jjtGetNumChildren() > 4) @@ -114,7 +114,7 @@ public class For extends Foreach String templateName) throws ParseException { super.checkArgs(argtypes, t, templateName); - + // If #foreach is defining an index variable make sure it has the 'index // $var' combo. if (argtypes.size() > 3) @@ -124,8 +124,8 @@ public class For extends Foreach throw new MacroParseException( "Expected word 'index' at argument position 4 in #foreach", templateName, t); - } - else if (argtypes.size() == 4 + } + else if (argtypes.size() == 4 || argtypes.get(4) != ParserTreeConstants.JJTREFERENCE) { throw new MacroParseException( Modified: velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/CharStream.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/CharStream.java?rev=1780307&r1=1780306&r2=1780307&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/CharStream.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/CharStream.java Thu Jan 26 01:57:00 2017 @@ -83,7 +83,7 @@ public interface CharStream { char BeginToken() throws java.io.IOException; /** - * Returns a string made up of characters from the marked token beginning + * 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. Modified: velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/TemplateParseException.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/TemplateParseException.java?rev=1780307&r1=1780306&r2=1780307&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/TemplateParseException.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/TemplateParseException.java Thu Jan 26 01:57:00 2017 @@ -16,7 +16,7 @@ package org.apache.velocity.runtime.pars * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License. */ import org.apache.velocity.exception.ExtendedParseException; Modified: velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/VelocityCharStream.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/VelocityCharStream.java?rev=1780307&r1=1780306&r2=1780307&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/VelocityCharStream.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/VelocityCharStream.java Thu Jan 26 01:57:00 2017 @@ -16,7 +16,7 @@ package org.apache.velocity.runtime.pars * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License. */ /** @@ -146,7 +146,7 @@ implements CharStream } int i; - try + try { if ((i = inputStream.read(buffer, maxNextCharInd, available - maxNextCharInd)) == -1) @@ -160,7 +160,7 @@ implements CharStream } return; } - catch(java.io.IOException e) + catch(java.io.IOException e) { --bufpos; backup(0); @@ -258,7 +258,7 @@ implements CharStream /** * @see org.apache.velocity.runtime.parser.CharStream#getEndColumn() */ - public final int getEndColumn() + public final int getEndColumn() { return bufcolumn[bufpos]; } @@ -266,7 +266,7 @@ implements CharStream /** * @see org.apache.velocity.runtime.parser.CharStream#getEndLine() */ - public final int getEndLine() + public final int getEndLine() { return bufline[bufpos]; } @@ -274,7 +274,7 @@ implements CharStream /** * @see org.apache.velocity.runtime.parser.CharStream#getBeginColumn() */ - public final int getBeginColumn() + public final int getBeginColumn() { return bufcolumn[tokenBegin]; } @@ -282,7 +282,7 @@ implements CharStream /** * @see org.apache.velocity.runtime.parser.CharStream#getBeginLine() */ - public final int getBeginLine() + public final int getBeginLine() { return bufline[tokenBegin]; } @@ -290,7 +290,7 @@ implements CharStream /** * @see org.apache.velocity.runtime.parser.CharStream#backup(int) */ - public final void backup(int amount) + public final void backup(int amount) { inBuf += amount; Modified: velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTAddNode.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTAddNode.java?rev=1780307&r1=1780306&r2=1780307&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTAddNode.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTAddNode.java Thu Jan 26 01:57:00 2017 @@ -16,7 +16,7 @@ package org.apache.velocity.runtime.pars * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License. */ import org.apache.velocity.context.InternalContextAdapter; @@ -87,7 +87,3 @@ public class ASTAddNode extends ASTMathN } } - - - - Modified: velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTAndNode.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTAndNode.java?rev=1780307&r1=1780306&r2=1780307&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTAndNode.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTAndNode.java Thu Jan 26 01:57:00 2017 @@ -16,7 +16,7 @@ package org.apache.velocity.runtime.pars * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License. */ import org.apache.velocity.context.InternalContextAdapter; @@ -116,4 +116,3 @@ public class ASTAndNode extends ASTLogic return false; } } - Modified: velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTAssignment.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTAssignment.java?rev=1780307&r1=1780306&r2=1780307&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTAssignment.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTAssignment.java Thu Jan 26 01:57:00 2017 @@ -16,7 +16,7 @@ package org.apache.velocity.runtime.pars * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License. */ import org.apache.velocity.context.InternalContextAdapter; @@ -52,7 +52,7 @@ public class ASTAssignment extends Simpl { return visitor.visit(this, data); } - + /** * @throws TemplateInitException * @see org.apache.velocity.runtime.parser.node.Node#init(org.apache.velocity.context.InternalContextAdapter, java.lang.Object) Modified: velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTBlock.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTBlock.java?rev=1780307&r1=1780306&r2=1780307&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTBlock.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTBlock.java Thu Jan 26 01:57:00 2017 @@ -16,7 +16,7 @@ package org.apache.velocity.runtime.pars * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License. */ import org.apache.velocity.context.InternalContextAdapter; @@ -41,7 +41,7 @@ public class ASTBlock extends SimpleNode // used during parsing public boolean endsWithNewline = false; - + /* * '#' and '$' prefix characters eaten by javacc MORE mode, prefixing the '#' ending the block */ Modified: velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTComment.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTComment.java?rev=1780307&r1=1780306&r2=1780307&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTComment.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTComment.java Thu Jan 26 01:57:00 2017 @@ -16,7 +16,7 @@ package org.apache.velocity.runtime.pars * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License. */ import org.apache.velocity.context.InternalContextAdapter; @@ -88,7 +88,7 @@ public class ASTComment extends SimpleNo { carr = t.image.substring(0, (loc1 == -1) ? loc2 : loc1).toCharArray(); } - + cleanupParserAndTokens(); return data; @@ -103,5 +103,5 @@ public class ASTComment extends SimpleNo writer.write(carr); return true; } - + } Modified: velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTComparisonNode.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTComparisonNode.java?rev=1780307&r1=1780306&r2=1780307&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTComparisonNode.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTComparisonNode.java Thu Jan 26 01:57:00 2017 @@ -16,7 +16,7 @@ package org.apache.velocity.runtime.pars * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License. */ import org.apache.velocity.context.InternalContextAdapter; Modified: velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTDirective.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTDirective.java?rev=1780307&r1=1780306&r2=1780307&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTDirective.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTDirective.java Thu Jan 26 01:57:00 2017 @@ -212,11 +212,11 @@ public class ASTDirective extends Simple die.getLineNumber() + getLine()); } isDirective = true; - + } isInitialized = true; - + saveTokenImages(); cleanupParserAndTokens(); } @@ -225,7 +225,7 @@ public class ASTDirective extends Simple { NodeUtils.fixIndentation(this, prefix); } - + return data; } @@ -345,6 +345,3 @@ public class ASTDirective extends Simple } } - - - Modified: velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTDirectiveAssign.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTDirectiveAssign.java?rev=1780307&r1=1780306&r2=1780307&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTDirectiveAssign.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTDirectiveAssign.java Thu Jan 26 01:57:00 2017 @@ -34,7 +34,7 @@ public class ASTDirectiveAssign extends { super(p, i); } - + /** * @throws TemplateInitException * @see org.apache.velocity.runtime.parser.node.Node#init(org.apache.velocity.context.InternalContextAdapter, java.lang.Object) @@ -46,6 +46,6 @@ public class ASTDirectiveAssign extends cleanupParserAndTokens(); // drop reference to Parser and all JavaCC Tokens return obj; } - + } Modified: velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTDivNode.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTDivNode.java?rev=1780307&r1=1780306&r2=1780307&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTDivNode.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTDivNode.java Thu Jan 26 01:57:00 2017 @@ -16,7 +16,7 @@ package org.apache.velocity.runtime.pars * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License. */ import org.apache.velocity.context.InternalContextAdapter; Modified: velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTEQNode.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTEQNode.java?rev=1780307&r1=1780306&r2=1780307&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTEQNode.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTEQNode.java Thu Jan 26 01:57:00 2017 @@ -16,7 +16,7 @@ package org.apache.velocity.runtime.pars * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License. */ import org.apache.velocity.runtime.parser.Parser; Modified: velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTElseIfStatement.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTElseIfStatement.java?rev=1780307&r1=1780306&r2=1780307&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTElseIfStatement.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTElseIfStatement.java Thu Jan 26 01:57:00 2017 @@ -16,7 +16,7 @@ package org.apache.velocity.runtime.pars * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License. */ import org.apache.velocity.context.InternalContextAdapter; Modified: velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTElseStatement.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTElseStatement.java?rev=1780307&r1=1780306&r2=1780307&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTElseStatement.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTElseStatement.java Thu Jan 26 01:57:00 2017 @@ -16,7 +16,7 @@ package org.apache.velocity.runtime.pars * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License. */ import org.apache.velocity.context.InternalContextAdapter; @@ -70,7 +70,7 @@ public class ASTElseStatement extends Si { return true; } - + /** * @throws TemplateInitException * @see org.apache.velocity.runtime.parser.node.Node#init(org.apache.velocity.context.InternalContextAdapter, java.lang.Object) @@ -82,4 +82,3 @@ public class ASTElseStatement extends Si return obj; } } - Modified: velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTEscape.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTEscape.java?rev=1780307&r1=1780306&r2=1780307&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTEscape.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTEscape.java Thu Jan 26 01:57:00 2017 @@ -16,7 +16,7 @@ package org.apache.velocity.runtime.pars * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License. */ import org.apache.velocity.context.InternalContextAdapter; Modified: velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTEscapedDirective.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTEscapedDirective.java?rev=1780307&r1=1780306&r2=1780307&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTEscapedDirective.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTEscapedDirective.java Thu Jan 26 01:57:00 2017 @@ -16,7 +16,7 @@ package org.apache.velocity.runtime.pars * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License. */ import org.apache.velocity.context.InternalContextAdapter; @@ -76,7 +76,7 @@ public class ASTEscapedDirective extends writer.write(firstImage); return true; } - + /** * @throws TemplateInitException * @see org.apache.velocity.runtime.parser.node.Node#init(org.apache.velocity.context.InternalContextAdapter, java.lang.Object) Modified: velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTExpression.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTExpression.java?rev=1780307&r1=1780306&r2=1780307&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTExpression.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTExpression.java Thu Jan 26 01:57:00 2017 @@ -16,7 +16,7 @@ package org.apache.velocity.runtime.pars * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License. */ import org.apache.velocity.context.InternalContextAdapter; @@ -71,7 +71,7 @@ public class ASTExpression extends Simpl { return jjtGetChild(0).value(context); } - + /** * @throws TemplateInitException * @see org.apache.velocity.runtime.parser.node.Node#init(org.apache.velocity.context.InternalContextAdapter, java.lang.Object) Modified: velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTFalse.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTFalse.java?rev=1780307&r1=1780306&r2=1780307&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTFalse.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTFalse.java Thu Jan 26 01:57:00 2017 @@ -16,7 +16,7 @@ package org.apache.velocity.runtime.pars * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License. */ import org.apache.velocity.context.InternalContextAdapter; @@ -70,7 +70,7 @@ public class ASTFalse extends SimpleNode { return value; } - + /** * @throws TemplateInitException * @see org.apache.velocity.runtime.parser.node.Node#init(org.apache.velocity.context.InternalContextAdapter, java.lang.Object) Modified: velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTFloatingPointLiteral.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTFloatingPointLiteral.java?rev=1780307&r1=1780306&r2=1780307&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTFloatingPointLiteral.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTFloatingPointLiteral.java Thu Jan 26 01:57:00 2017 @@ -16,7 +16,7 @@ package org.apache.velocity.runtime.pars * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License. */ import org.apache.velocity.context.InternalContextAdapter; Modified: velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTGENode.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTGENode.java?rev=1780307&r1=1780306&r2=1780307&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTGENode.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTGENode.java Thu Jan 26 01:57:00 2017 @@ -16,7 +16,7 @@ package org.apache.velocity.runtime.pars * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License. */ import org.apache.velocity.runtime.parser.Parser; Modified: velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTGTNode.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTGTNode.java?rev=1780307&r1=1780306&r2=1780307&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTGTNode.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTGTNode.java Thu Jan 26 01:57:00 2017 @@ -16,7 +16,7 @@ package org.apache.velocity.runtime.pars * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License. */ import org.apache.velocity.runtime.parser.Parser; Modified: velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTIdentifier.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTIdentifier.java?rev=1780307&r1=1780306&r2=1780307&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTIdentifier.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTIdentifier.java Thu Jan 26 01:57:00 2017 @@ -16,7 +16,7 @@ package org.apache.velocity.runtime.pars * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License. */ import org.apache.velocity.app.event.EventHandlerUtil; @@ -56,7 +56,7 @@ public class ASTIdentifier extends Simpl * This is really immutable after the init, so keep one for this node */ protected Info uberInfo; - + /** * Indicates if we are running in strict reference mode. */ @@ -106,10 +106,10 @@ public class ASTIdentifier extends Simpl uberInfo = new Info(getTemplateName(), getLine(), getColumn()); strictRef = rsvc.getBoolean(RuntimeConstants.RUNTIME_REFERENCES_STRICT, false); - + saveTokenImages(); cleanupParserAndTokens(); - + return data; } @@ -182,7 +182,7 @@ public class ASTIdentifier extends Simpl { if (strictRef) { - throw new MethodInvocationException("Object '" + o.getClass().getName() + + throw new MethodInvocationException("Object '" + o.getClass().getName() + "' does not contain property '" + identifier + "'", null, identifier, uberInfo.getTemplateName(), uberInfo.getLine(), uberInfo.getColumn()); } Modified: velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTIfStatement.java URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTIfStatement.java?rev=1780307&r1=1780306&r2=1780307&view=diff ============================================================================== --- velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTIfStatement.java (original) +++ velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTIfStatement.java Thu Jan 26 01:57:00 2017 @@ -16,7 +16,7 @@ package org.apache.velocity.runtime.pars * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License. */ /** @@ -214,4 +214,4 @@ public class ASTIfStatement extends Simp public void process( InternalContextAdapter context, ParserVisitor visitor) { } -} \ No newline at end of file +}