aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md2
-rw-r--r--pom.xml2
-rw-r--r--src/changes/changes.xml94
-rw-r--r--velocity-engine-core/pom.xml4
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/Template.java8
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/VelocityContext.java4
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/app/FieldMethodizer.java2
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/app/event/EventCartridge.java2
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/app/event/EventHandler.java2
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/app/event/EventHandlerUtil.java24
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/app/event/IncludeEventHandler.java2
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/app/event/InvalidReferenceEventHandler.java34
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/app/event/MethodExceptionEventHandler.java2
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/app/event/ReferenceInsertionEventHandler.java2
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/app/event/implement/EscapeSqlReference.java2
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/app/event/implement/IncludeNotFound.java14
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/app/event/implement/IncludeRelativePath.java4
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/app/event/implement/InvalidReferenceInfo.java14
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/app/event/implement/PrintExceptions.java2
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/app/event/implement/ReportInvalidReferences.java44
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/context/AbstractContext.java7
-rwxr-xr-xvelocity-engine-core/src/main/java/org/apache/velocity/context/ChainedInternalContextAdapter.java8
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/context/Context.java2
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/context/InternalContextAdapter.java2
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/context/InternalContextAdapterImpl.java2
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/context/InternalContextBase.java4
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/context/InternalEventContext.java2
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/context/InternalHousekeepingContext.java2
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/context/InternalWrapperContext.java10
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/exception/ExtendedParseException.java2
-rwxr-xr-xvelocity-engine-core/src/main/java/org/apache/velocity/exception/MathException.java4
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/exception/MethodInvocationException.java2
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/exception/ParseErrorException.java36
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/exception/ResourceNotFoundException.java2
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/exception/TemplateInitException.java14
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/exception/VelocityException.java6
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/io/Filter.java2
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/io/VelocityWriter.java10
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/ParserPool.java2
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/ParserPoolImpl.java2
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeInstance.java10
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeServices.java2
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/VelocimacroManager.java18
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/BlockMacro.java10
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Break.java8
-rwxr-xr-xvelocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Define.java10
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/DirectiveConstants.java2
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Evaluate.java34
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Foreach.java24
-rwxr-xr-xvelocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/ForeachScope.java2
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Include.java4
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/InputBase.java2
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Macro.java46
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/MacroParseException.java2
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Parse.java23
-rwxr-xr-xvelocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Scope.java2
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Stop.java10
-rwxr-xr-xvelocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/StopCommand.java2
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/VelocimacroProxy.java29
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/contrib/For.java10
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/CharStream.java2
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/TemplateParseException.java2
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/VelocityCharStream.java16
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTAddNode.java6
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTAndNode.java3
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTAssignment.java4
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTBlock.java4
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTComment.java6
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTComparisonNode.java2
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTDirective.java9
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTDirectiveAssign.java4
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTDivNode.java2
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTEQNode.java2
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTElseIfStatement.java2
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTElseStatement.java5
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTEscape.java2
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTEscapedDirective.java4
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTExpression.java4
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTFalse.java4
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTFloatingPointLiteral.java2
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTGENode.java2
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTGTNode.java2
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTIdentifier.java10
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTIfStatement.java4
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTIncludeStatement.java6
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTIndex.java42
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTIntegerLiteral.java2
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTIntegerRange.java4
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTLENode.java2
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTLTNode.java2
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTMap.java4
-rwxr-xr-xvelocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTMathNode.java6
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTMethod.java2
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTModNode.java7
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTMulNode.java10
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTNENode.java2
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTNotNode.java4
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTObjectArray.java6
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTOrNode.java7
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTParameters.java2
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTReference.java130
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTSetDirective.java24
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTSubtractNode.java5
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTText.java11
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTTextblock.java10
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTTrue.java4
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTVariable.java4
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTWord.java4
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTprocess.java4
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/AbstractExecutor.java2
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/BooleanPropertyExecutor.java4
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/GetExecutor.java2
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/MapGetExecutor.java8
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/MapSetExecutor.java8
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/MathUtils.java6
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/PutExecutor.java2
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/SetExecutor.java2
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/ContentResource.java4
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/Resource.java6
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/ResourceCache.java2
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/ResourceFactory.java2
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/ResourceManager.java4
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/loader/JarHolder.java9
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/loader/ResourceLoader.java2
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/loader/ResourceLoaderFactory.java2
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/util/StringResource.java6
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/util/StringResourceRepository.java8
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/util/StringResourceRepositoryImpl.java2
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/visitor/BaseVisitor.java2
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/visitor/NodeViewMode.java2
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/util/ArrayIterator.java2
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/util/ClassUtils.java16
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/util/ContextAware.java2
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/util/DuckType.java2
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/util/EnumerationIterator.java2
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/util/Pair.java2
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/util/RuntimeServicesAware.java4
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/util/SimplePool.java2
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/util/StringBuilderWriter.java12
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/util/StringUtils.java18
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/util/TemplateBoolean.java2
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/util/TemplateNumber.java2
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/util/TemplateString.java2
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/AbstractChainableUberspector.java14
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/ChainableUberspector.java4
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/ConversionHandlerImpl.java6
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/Converter.java2
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/DeprecatedCheckUberspector.java2
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/Info.java6
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/IntrospectionCacheData.java2
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/IntrospectionUtils.java2
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/Introspector.java2
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/IntrospectorBase.java8
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/IntrospectorCache.java4
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/LinkingUberspector.java14
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/MethodMap.java6
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/SecureIntrospectorControl.java6
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/SecureUberspector.java18
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/Uberspect.java2
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/UberspectImpl.java8
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/VelMethod.java2
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/VelPropertyGet.java2
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/VelPropertySet.java2
-rw-r--r--velocity-engine-core/src/main/parser/Parser.jjt9
-rw-r--r--velocity-engine-core/src/main/resources/org/apache/velocity/runtime/defaults/directive.properties2
-rw-r--r--velocity-engine-core/src/test/java/org/apache/velocity/test/ArithmeticTestCase.java2
-rw-r--r--velocity-engine-core/src/test/java/org/apache/velocity/test/ArrayMethodsTestCase.java4
-rw-r--r--velocity-engine-core/src/test/java/org/apache/velocity/test/BlockMacroTestCase.java21
-rw-r--r--velocity-engine-core/src/test/java/org/apache/velocity/test/BreakDirectiveTestCase.java2
-rw-r--r--velocity-engine-core/src/test/java/org/apache/velocity/test/BuiltInEventHandlerTestCase.java4
-rw-r--r--velocity-engine-core/src/test/java/org/apache/velocity/test/CommentsTestCase.java34
-rw-r--r--velocity-engine-core/src/test/java/org/apache/velocity/test/CommonsExtPropTestCase.java10
-rw-r--r--velocity-engine-core/src/test/java/org/apache/velocity/test/ContextAutoreferenceKeyTestCase.java2
-rwxr-xr-xvelocity-engine-core/src/test/java/org/apache/velocity/test/DefineTestCase.java2
-rw-r--r--velocity-engine-core/src/test/java/org/apache/velocity/test/EvaluateTestCase.java56
-rw-r--r--velocity-engine-core/src/test/java/org/apache/velocity/test/EventHandlingTestCase.java2
-rw-r--r--velocity-engine-core/src/test/java/org/apache/velocity/test/ExceptionTestCase.java2
-rw-r--r--velocity-engine-core/src/test/java/org/apache/velocity/test/ExpressionAsMethodArgumentTestCase.java2
-rw-r--r--velocity-engine-core/src/test/java/org/apache/velocity/test/FilteredEventHandlingTestCase.java2
-rw-r--r--velocity-engine-core/src/test/java/org/apache/velocity/test/ForeachTestCase.java24
-rw-r--r--velocity-engine-core/src/test/java/org/apache/velocity/test/GetAsTestCase.java4
-rw-r--r--velocity-engine-core/src/test/java/org/apache/velocity/test/IfEmptyTestCase.java4
-rwxr-xr-xvelocity-engine-core/src/test/java/org/apache/velocity/test/IfNullTestCase.java4
-rw-r--r--velocity-engine-core/src/test/java/org/apache/velocity/test/IndexTestCase.java26
-rw-r--r--velocity-engine-core/src/test/java/org/apache/velocity/test/IntrospectionCacheDataTestCase.java32
-rw-r--r--velocity-engine-core/src/test/java/org/apache/velocity/test/Introspector2TestCase.java2
-rw-r--r--velocity-engine-core/src/test/java/org/apache/velocity/test/Introspector3TestCase.java2
-rw-r--r--velocity-engine-core/src/test/java/org/apache/velocity/test/IntrospectorTestCase.java4
-rw-r--r--velocity-engine-core/src/test/java/org/apache/velocity/test/InvalidEventHandlerTestCase.java120
-rw-r--r--velocity-engine-core/src/test/java/org/apache/velocity/test/MacroAutoReloadTestCase.java4
-rw-r--r--velocity-engine-core/src/test/java/org/apache/velocity/test/MacroCommentsTestCase.java6
-rw-r--r--velocity-engine-core/src/test/java/org/apache/velocity/test/MacroDefaultArgTestCase.java6
-rw-r--r--velocity-engine-core/src/test/java/org/apache/velocity/test/MethodCacheKeyTestCase.java42
-rw-r--r--velocity-engine-core/src/test/java/org/apache/velocity/test/MethodInvocationExceptionTestCase.java2
-rw-r--r--velocity-engine-core/src/test/java/org/apache/velocity/test/MethodOverloadingTestCase.java44
-rw-r--r--velocity-engine-core/src/test/java/org/apache/velocity/test/MiscTestCase.java4
-rw-r--r--velocity-engine-core/src/test/java/org/apache/velocity/test/NumberMethodCallsTestCase.java4
-rw-r--r--velocity-engine-core/src/test/java/org/apache/velocity/test/ParseWithMacroLibsTestCase.java26
-rw-r--r--velocity-engine-core/src/test/java/org/apache/velocity/test/ParserTestCase.java2
-rwxr-xr-xvelocity-engine-core/src/test/java/org/apache/velocity/test/PropertyMethodPrecedenceTestCase.java4
-rw-r--r--velocity-engine-core/src/test/java/org/apache/velocity/test/RenderVelocityTemplateTest.java14
-rwxr-xr-xvelocity-engine-core/src/test/java/org/apache/velocity/test/ResourceExistsTestCase.java2
-rwxr-xr-xvelocity-engine-core/src/test/java/org/apache/velocity/test/ScopeTestCase.java2
-rw-r--r--velocity-engine-core/src/test/java/org/apache/velocity/test/SetTestCase.java3
-rwxr-xr-xvelocity-engine-core/src/test/java/org/apache/velocity/test/StaticUtilityMethodsTestCase.java2
-rw-r--r--velocity-engine-core/src/test/java/org/apache/velocity/test/StrictCompareTestCase.java8
-rw-r--r--velocity-engine-core/src/test/java/org/apache/velocity/test/StrictEscapeTestCase.java36
-rwxr-xr-xvelocity-engine-core/src/test/java/org/apache/velocity/test/StrictForeachTestCase.java2
-rwxr-xr-xvelocity-engine-core/src/test/java/org/apache/velocity/test/StrictMathTestCase.java4
-rw-r--r--velocity-engine-core/src/test/java/org/apache/velocity/test/StrictReferenceTestCase.java42
-rwxr-xr-xvelocity-engine-core/src/test/java/org/apache/velocity/test/StringConcatenationTestCase.java2
-rw-r--r--velocity-engine-core/src/test/java/org/apache/velocity/test/TestBaseTestCase.java2
-rw-r--r--velocity-engine-core/src/test/java/org/apache/velocity/test/TextblockTestCase.java6
-rwxr-xr-xvelocity-engine-core/src/test/java/org/apache/velocity/test/URLResourceLoaderTimeoutTestCase.java2
-rw-r--r--velocity-engine-core/src/test/java/org/apache/velocity/test/UberspectorTestCase.java6
-rw-r--r--velocity-engine-core/src/test/java/org/apache/velocity/test/VarargMethodsTestCase.java4
-rw-r--r--velocity-engine-core/src/test/java/org/apache/velocity/test/VelocityAppTestCase.java2
-rw-r--r--velocity-engine-core/src/test/java/org/apache/velocity/test/WrappedExceptionTestCase.java2
-rw-r--r--velocity-engine-core/src/test/java/org/apache/velocity/test/eventhandler/Handler2.java2
-rw-r--r--velocity-engine-core/src/test/java/org/apache/velocity/test/issues/VelTools66TestCase.java2
-rwxr-xr-xvelocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity532TestCase.java2
-rw-r--r--velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity544TestCase.java16
-rwxr-xr-xvelocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity587TestCase.java2
-rwxr-xr-xvelocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity614TestCase.java2
-rwxr-xr-xvelocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity615TestCase.java2
-rwxr-xr-xvelocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity616TestCase.java2
-rwxr-xr-xvelocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity625TestCase.java2
-rw-r--r--velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity627TestCase.java6
-rw-r--r--velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity629TestCase.java4
-rwxr-xr-xvelocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity62TestCase.java2
-rwxr-xr-xvelocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity631TestCase.java2
-rw-r--r--velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity667TestCase.java4
-rw-r--r--velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity682TestCase.java8
-rwxr-xr-xvelocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity689TestCase.java2
-rwxr-xr-xvelocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity701TestCase.java6
-rwxr-xr-xvelocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity702TestCase.java2
-rw-r--r--velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity709TestCase.java6
-rw-r--r--velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity727TestCase.java2
-rw-r--r--velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity728TestCase.java2
-rw-r--r--velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity729TestCase.java4
-rw-r--r--velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity736TestCase.java2
-rw-r--r--velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity742TestCase.java8
-rw-r--r--velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity747TestCase.java2
-rwxr-xr-xvelocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity753TestCase.java22
-rwxr-xr-xvelocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity755TestCase.java2
-rw-r--r--velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity758TestCase.java4
-rwxr-xr-xvelocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity762TestCase.java2
-rw-r--r--velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity785TestCase.java2
-rw-r--r--velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity830TestCase.java2
-rw-r--r--velocity-engine-core/src/test/java/org/apache/velocity/test/misc/ExceptionGeneratingDirective.java2
-rw-r--r--velocity-engine-core/src/test/java/org/apache/velocity/test/misc/ExceptionGeneratingEventHandler.java2
-rw-r--r--velocity-engine-core/src/test/java/org/apache/velocity/test/misc/ExceptionGeneratingResourceLoader.java2
-rw-r--r--velocity-engine-core/src/test/java/org/apache/velocity/test/misc/GetPutObject.java2
-rw-r--r--velocity-engine-core/src/test/java/org/apache/velocity/test/misc/TestContext.java8
-rw-r--r--velocity-engine-core/src/test/java/org/apache/velocity/test/misc/TestLogger.java6
-rw-r--r--velocity-engine-core/src/test/java/org/apache/velocity/test/misc/UberspectTestException.java2
-rw-r--r--velocity-engine-core/src/test/java/org/apache/velocity/test/misc/UberspectTestImpl.java2
-rw-r--r--velocity-engine-core/src/test/java/org/apache/velocity/test/misc/UberspectorTestObject.java4
-rw-r--r--velocity-engine-core/src/test/java/org/apache/velocity/test/provider/BoolObj.java2
-rw-r--r--velocity-engine-core/src/test/java/org/apache/velocity/test/provider/Child.java2
-rw-r--r--velocity-engine-core/src/test/java/org/apache/velocity/test/provider/ForeachMethodCallHelper.java2
-rw-r--r--velocity-engine-core/src/test/java/org/apache/velocity/test/provider/NullToStringObject.java2
-rw-r--r--velocity-engine-core/src/test/java/org/apache/velocity/test/provider/NumberMethods.java7
-rw-r--r--velocity-engine-core/src/test/java/org/apache/velocity/test/provider/Person.java2
-rw-r--r--velocity-engine-core/src/test/java/org/apache/velocity/test/provider/TestNumber.java2
-rw-r--r--velocity-engine-core/src/test/java/org/apache/velocity/test/provider/TestProvider.java2
-rw-r--r--velocity-engine-core/src/test/java/org/apache/velocity/test/sql/BaseSQLTest.java4
-rw-r--r--velocity-engine-core/src/test/java/org/apache/velocity/test/sql/HsqlDataSource.java2
-rw-r--r--velocity-engine-core/src/test/java/org/apache/velocity/test/util/introspection/ClassMapTestCase.java6
-rw-r--r--velocity-engine-core/src/test/java/org/apache/velocity/test/util/introspection/ConversionHandlerTestCase.java6
-rw-r--r--velocity-engine-core/src/test/java/org/apache/velocity/test/view/TemplateNodeView.java2
-rw-r--r--velocity-engine-core/src/test/java/org/apache/velocity/util/SimplePoolTestCase.java2
-rw-r--r--velocity-engine-examples/src/etc/README.txt18
-rw-r--r--velocity-engine-examples/src/etc/app_example1/README.txt2
-rw-r--r--velocity-engine-examples/src/etc/app_example1/appendVELCP.bat2
-rw-r--r--velocity-engine-examples/src/etc/app_example2/README.txt5
-rw-r--r--velocity-engine-examples/src/etc/app_example2/appendVELCP.bat2
-rw-r--r--velocity-engine-examples/src/etc/context_example/README.txt7
-rw-r--r--velocity-engine-examples/src/etc/xmlapp_example/README.txt8
-rw-r--r--velocity-engine-examples/src/etc/xmlapp_example/appendVELCP.bat2
-rw-r--r--velocity-engine-examples/src/main/java/org/apache/velocity/example/Example.java2
-rw-r--r--velocity-engine-examples/src/main/java/org/apache/velocity/example/XMLTest.java3
-rw-r--r--velocity-engine-examples/src/main/resources/dbtest.vm3
-rw-r--r--velocity-engine-examples/src/main/resources/example.vm2
-rw-r--r--velocity-engine-examples/src/main/resources/example2.vm2
-rw-r--r--velocity-engine-examples/src/main/resources/velocity.properties3
-rw-r--r--velocity-engine-examples/src/main/resources/xml.vm2
-rw-r--r--velocity-engine-scripting/src/main/java/org/apache/velocity/script/VelocityScriptEngine.java36
-rw-r--r--velocity-engine-scripting/src/main/java/org/apache/velocity/script/VelocityScriptEngineFactory.java32
-rw-r--r--velocity-engine-scripting/src/test/java/org/apache/velocity/script/test/ScriptEngineTest.java2
-rw-r--r--velocity-engine-scripting/src/test/resources/velocity.properties3
291 files changed, 1107 insertions, 1200 deletions
diff --git a/README.md b/README.md
index b60ed1c5..4b8e0a06 100644
--- a/README.md
+++ b/README.md
@@ -14,7 +14,7 @@ Here's a description of the top level directories:
velocity-engine-examples/ Several simple examples
velocity-engine-scripting/ JSR-223 implementation for Velocity scripting
src/ Source for parent modules, mainly changelog
-
+
## REQUIREMENTS
Apache Velocity will run with any Java runtime engine v1.7 or greater.
diff --git a/pom.xml b/pom.xml
index 4e6ed211..1381ef3b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -59,7 +59,7 @@
</properties>
</profile>
</profiles>
-
+
<build>
<defaultGoal>install</defaultGoal>
<pluginManagement>
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 3e62635c..b9a394a3 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -42,7 +42,7 @@
<action type="add" dev="cbrisson">
Default encoding is now UTF-8.
</action>
-
+
<action type="add" dev="cbrisson">
Make Velocity use the base logger namespace 'org.apache.velocity' unless specified with runtime.log.name in the configuration, and have the runtime instance log with this base namespace, and other modules log with children namespaces:
<ul>
@@ -55,11 +55,11 @@
</ul>
Get rid of UberspectLoggable interface.
</action>
-
+
<action type="add" dev="cbrisson">
Added unary negate math operator
</action>
-
+
<action type="add" dev="cbrisson">
Add a configurable space gobbling feature, to control indentation in the generated code.
<br/>
@@ -87,115 +87,115 @@
<action type="fix" dev="cbrisson" issue="VELOCITY-843">
support $array.empty, as for $list.empty
</action>
-
+
<action type="fix" dev="cbrisson" issue="VELOCITY-833" due-to="Jarkko Viinamäki">
avoid useless string calculation in ASTStringLiteral
</action>
-
+
<action type="add" dev="cbrisson">
nicified AST tree debug output
</action>
-
+
<action type="fix" dev="cbrisson" issue="VELOCITY-830">
fix parsing of $obj._method()
</action>
-
+
<action type="fix" dev="cbrisson" issue="VELOCITY-827" due-to="Dawid Weiss">
loading default properties should not prepend '/' and should use classloader to get resource stream
</action>
-
+
<action type="add" dev="cbrisson" issue="VELOCITY-825">
Allow conversion of method args from String to Enum constant
</action>
-
+
<action type="fix" dev="cbrisson" issue="VELOCITY-815" due-to="Oswaldo Hernandez">
Applied performance patch for MapGetExecutor: it's faster to directly use object
instance rather than to inspect all public interfaces
</action>
-
+
<action type="add" dev="cbrisson" issue="VELOCITY-799">
The new configuration property context.autoreference.key, if present, allows to specify the name
of the reference under which the context is accessible in itself
</action>
-
+
<action type="add" dev="cbrisson" issue="VELOCITY-746">
MethodExceptionEventHandler now provide template location infos
</action>
-
+
<action type="fix" dev="cbrisson" issue="VELOCITY-797" due-to="Jarkko Viinamäki">
Attach macros to their defining template. Also fixes VELOCITY-776. Thanks to Simon Kitching for the multithreading testcase.
</action>
-
+
<action type="fix" dev="cbrisson" issue="VELOCITY-820" due-to="Robert Fuller">
have #foreach honnor the Closeable interface on the iterator
</action>
-
+
<action type="fix" dev="cbrisson" issue="VELOCITY-804" due-to="Felipe Maschio">
Don't leave 'initializing' to true if a problem occurs during initialization.
</action>
-
+
<action type="add" dev="cbrisson" issue="VELOCITY-790">
Remove dependency upon commons-collections-3 (except at compile-time for deprecated methods and classes
which are needed for backward compatibility), use our own ExtProperties object.
</action>
-
+
<action type="add" dev="cbrisson" issue="VELOCITY-735" due-to="Dishara Wijewardana">
Add a first implementation for the JSR 223 standard scripting interface.
</action>
-
+
<action type="fix" dev="cbrisson" issue="VELOCITY-809">
Fix Template default encoding initialization problem.
</action>
-
+
<action type="add" dev="cbrisson" issue="VELOCITY-793">
The ResourceLoader API now provides a Reader rather than an InputStream.
Also fixes VELOCITY-599.
</action>
-
+
<action type="fix" dev="cbrisson" issue="VELOCITY-553">
InvalidReferenceHandler events should not be triggered by quiet references, null values,
or by references testing inside #if / #elseif. Thanks to Renato Steiner
for his testcase.
</action>
-
+
<action type="fix" dev="cbrisson" issue="VELOCITY-266">
Take advantage of the major version jump to enforce String keys
in internal Context API
</action>
-
+
<action type="fix" dev="sdimitriu" issue="VELOCITY-863" due-to="Mike Kienenberger">
Fix regression: #set&lt;tab&gt;left-paren no longer valid grammar
Patch from Mike Kienenberger applied + added test
</action>
-
+
<action type="add" dev="cbrisson">
switch to slf4j logging facade
</action>
-
+
<action type="fix" dev="cbrisson">
fix parser for '$map{key}' text rendering (StackOverflow 32805217)
</action>
-
+
<action type="fix" dev="sdimitriu" issue="VELOCITY-869">
Vulnerability in dependency: commons-collections: 3.2.1
</action>
-
+
<action type="fix" dev="sdimitriu" issue="VELOCITY-870">
Exception displayed when trying to loop over an Iterable private class
</action>
-
+
<action type="fix" dev="sdimitriu" issue="VELOCITY-871">
#foreach should work over any Iterable class
</action>
-
+
<action type="fix" dev="sdimitriu">
Catch exceptions raised during chainable uberspector initialization
</action>
-
+
<action type="fix" dev="cbrisson" issue="VELOCITY-542">
Hypen is no more allowed in variable names
</action>
-
+
<action type="add" dev="cbrisson" issue="VELOCITY-706">
Method arguments can now be expressions
</action>
@@ -259,16 +259,16 @@
Add ability to specify default values for macro parameters, e.g.;
#macro(foo bar=1)
</action>
-
+
<action type="add" dev="byron" issue="VELOCITY-695">
Add ability to place line comments next to macro parameter definitions.
</action>
-
+
<action type="add" dev="byron" issue="VELOCITY-690">
Block directives no longer require parenthesis so #@foo #end is now allowed.
Also, brackets now work with Block Macros so #{@foo}bar#end works.
</action>
-
+
<action type="fix" dev="nbubna">
Removed all deprecations (Anakia, Texen, VelocityServlet, etc.)
</action>
@@ -413,7 +413,7 @@
the exception and render nothing then the reference can be
preceeded with '$!' as in $!foo.
</action>
-
+
<action type="add" dev="byron" issue="VELOCITY-673">
The non default VelocityEngine construtors now do not initialize the runtime
system so that properties may be set after construction. Also fixes an
@@ -429,7 +429,7 @@
slash before a reference or macro always escapes the reference or macro and
absorbs the forward slash regardless if the reference or macro is defined.
</action>
-
+
<action type="fix" dev="nbubna" issue="VELOCITY-676" due-to="Jarkko Viinamäki">
Fix StringIndexOutOfBoundsException caused by #[[##x]]# (line comment on
same line as end of textblock).
@@ -442,7 +442,7 @@
<action type="add" dev="byron" issue="VELOCITY-668" due-to="Jarkko Viinamäki">
Minor performance tweaks based on Findbugs findings
</action>
-
+
<action type="fix" dev="byron" issue="VELOCITY-667">
Pre 1.6 behavior of specifying #macro without parenthesis
would throw a VelocityException has been restored.
@@ -467,20 +467,20 @@
Also addresses a performance bottleneck detected in the old implementation.
#stop is a general use directive now, and not just for debugging.
</action>
-
+
<action type="add" dev="byron" issue="VELOCITY-662">
Reduce performance bottleneck with the referenceInsert event handler call
</action>
-
+
<action type="add" dev="byron" issue="VELOCITY-656">
Better error reporting when toString() throw an exception when testing
an #if conditional. For example #if($foo)
</action>
-
+
<action type="add" dev="byron" issue="VELOCITY-406">
Added bracketed index syntax, $foo[0], or #set($foo[0] = 1)
</action>
-
+
<action type="add" dev="byron" issue="VELOCITY-659">
Removed java.lang.Exception from throws clause of Velocity
and VelocityEngine API. Also removed IOException so that all
@@ -557,7 +557,7 @@
Pre 1.6 behavior of specifying #macro without parenthesis
would throw a VelocityException has been restored.
</action>
-
+
<action type="add" dev="byron" issue="VELOCITY-656">
Better error reporting when toString() throw an exception
when testing an #if conditional. For example #if($foo)
@@ -571,7 +571,7 @@
Throw an exception in strict mode when >=, &lt;=, &lt; or >
comparisons can't be made.
</action>
-
+
<action type="fix" dev="cbrisson" issue="VELOCITY-657">
Fix $velocityHasNext so it is not always true.
</action>
@@ -758,7 +758,7 @@
</action>
<action type="fix" dev="wglass" issue="VELOCITY-566" due-to="Etienne Massip">
- Prevent exception due to simultaneous rendering of macros.
+ Prevent exception due to simultaneous rendering of macros.
</action>
<action type="add" dev="nbubna" issue="VELOCITY-533" due-to="Christopher Schultz">
@@ -770,7 +770,7 @@
</action>
<action type="fix" dev="wglass" issue="VELOCITY-536" due-to="Lei Gu, Dima Tkach">
- Prevent NPE when template is parsed simultaneously by multiple users. (may apply only to macros).
+ Prevent NPE when template is parsed simultaneously by multiple users. (may apply only to macros).
</action>
<action type="fix" dev="wglass" issue="VELOCITY-362" due-to="Supun Kamburugamuva">
@@ -825,7 +825,7 @@
<action type="update" dev="wglass">
Deprecate integrated texen and anakia, factor it out into separate jars.
</action>
-
+
<action type="add" dev="wglass" issue="VELOCITY-509">
Added new directive #evaluate() to dynamically evaluate VTL.
</action>
@@ -844,7 +844,7 @@
</action>
</release>
-
+
<release version="1.5-beta2" date="2006-11-24">
<action type="add" dev="henning" issue="VELOCITY-183" due-to="Eelco Hillenius">
@@ -889,7 +889,7 @@
</action>
<action type="fix" dev="henning" issue="VELOCITY-449" due-to="Alexey Panchenko">
- Add an additional pair of Executors that are smart about Map.
+ Add an additional pair of Executors that are smart about Map.
</action>
<action type="fix" dev="wglass" issue="VELOCITY-453" due-to="Alexey Panchenko">
@@ -897,7 +897,7 @@
</action>
<action type="fix" dev="wglass" issue="VELOCITY-459" due-to="Stephen Haberman">
- Change the meaning of localscope for macros to allow access to references from
+ Change the meaning of localscope for macros to allow access to references from
calling context.
</action>
diff --git a/velocity-engine-core/pom.xml b/velocity-engine-core/pom.xml
index 5fa8720b..79866500 100644
--- a/velocity-engine-core/pom.xml
+++ b/velocity-engine-core/pom.xml
@@ -116,10 +116,10 @@
<nodeUsesParser>true</nodeUsesParser>
<nodePackage>org.apache.velocity.runtime.parser.node</nodePackage>
<sourceDirectory>${basedir}/src/main/parser</sourceDirectory>
-<!--
+<!--
<interimDirectory>${basedir}/src/main/java</interimDirectory>
<outputDirectory>${basedir}/src/main/java</outputDirectory>
--->
+-->
</configuration>
</plugin>
</plugins>
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/Template.java b/velocity-engine-core/src/main/java/org/apache/velocity/Template.java
index c4bd3533..6c0bb5fd 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/Template.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/Template.java
@@ -82,7 +82,7 @@ public class Template extends Resource
public Template()
{
super();
-
+
setType(ResourceManager.RESOURCE_TEMPLATE);
}
@@ -185,7 +185,7 @@ public class Template extends Resource
if (errorCondition == null)
{
throw new VelocityException(e);
- }
+ }
}
}
}
@@ -264,7 +264,7 @@ public class Template extends Resource
merge(context, writer, null);
}
-
+
/**
* The AST node structure is merged with the
* context to produce the final output.
@@ -339,7 +339,7 @@ public class Template extends Resource
(String)macroLibraries.get(i), pe.getMessage(), pe);
throw pe;
}
-
+
catch (Exception e)
{
throw new RuntimeException("Template.merge(): parse failed in template " +
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/VelocityContext.java b/velocity-engine-core/src/main/java/org/apache/velocity/VelocityContext.java
index 993ffeb4..875e2021 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/VelocityContext.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/VelocityContext.java
@@ -16,7 +16,7 @@ package org.apache.velocity;
* "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.AbstractContext;
@@ -183,5 +183,5 @@ public class VelocityContext extends AbstractContext implements Cloneable
{
}
return clone;
- }
+ }
}
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/app/FieldMethodizer.java b/velocity-engine-core/src/main/java/org/apache/velocity/app/FieldMethodizer.java
index 56e22d31..f77088ab 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/app/FieldMethodizer.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/app/FieldMethodizer.java
@@ -16,7 +16,7 @@ package org.apache.velocity.app;
* "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.util.ClassUtils;
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/app/event/EventCartridge.java b/velocity-engine-core/src/main/java/org/apache/velocity/app/event/EventCartridge.java
index 0229a517..4ff0bb9a 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/app/event/EventCartridge.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/app/event/EventCartridge.java
@@ -16,7 +16,7 @@ package org.apache.velocity.app.event;
* "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.Context;
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/app/event/EventHandler.java b/velocity-engine-core/src/main/java/org/apache/velocity/app/event/EventHandler.java
index 4dab6dab..9adbb075 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/app/event/EventHandler.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/app/event/EventHandler.java
@@ -16,7 +16,7 @@ package org.apache.velocity.app.event;
* "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.
*/
/**
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/app/event/EventHandlerUtil.java b/velocity-engine-core/src/main/java/org/apache/velocity/app/event/EventHandlerUtil.java
index 7e476561..cef027a7 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/app/event/EventHandlerUtil.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/app/event/EventHandlerUtil.java
@@ -16,7 +16,7 @@ package org.apache.velocity.app.event;
* "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;
@@ -39,12 +39,12 @@ import java.util.Iterator;
* @since 1.5
*/
public class EventHandlerUtil {
-
-
+
+
/**
* Called before a reference is inserted. All event handlers are called in
* sequence. The default implementation inserts the reference as is.
- *
+ *
* This is a major hotspot method called by ASTReference render.
*
* @param reference reference from template about to be inserted
@@ -124,7 +124,7 @@ public class EventHandlerUtil {
/* default behaviour is to re-throw exception */
throw e;
}
-
+
/**
* Called when an include-type directive is encountered (#include or
* #parse). All the registered event handlers are called unless null is
@@ -169,11 +169,11 @@ public class EventHandlerUtil {
throw new VelocityException("Exception in event handler.",e);
}
}
-
+
/**
* Called when an invalid get method is encountered.
- *
+ *
* @param rsvc current instance of RuntimeServices
* @param context the context when the reference was found invalid
* @param reference complete invalid reference
@@ -183,7 +183,7 @@ public class EventHandlerUtil {
* @return substitute return value for missing reference, or null if no substitute
*/
public static Object invalidGetMethod(RuntimeServices rsvc,
- InternalContextAdapter context, String reference,
+ InternalContextAdapter context, String reference,
Object object, String property, Info info)
{
try
@@ -209,7 +209,7 @@ public class EventHandlerUtil {
/**
* Called when an invalid set method is encountered.
- *
+ *
* @param rsvc current instance of RuntimeServices
* @param context the context when the reference was found invalid
* @param leftreference left reference being assigned to
@@ -217,7 +217,7 @@ public class EventHandlerUtil {
* @param info contains info on template, line, col
*/
public static void invalidSetMethod(RuntimeServices rsvc,
- InternalContextAdapter context, String leftreference,
+ InternalContextAdapter context, String leftreference,
String rightreference, Info info)
{
try
@@ -241,10 +241,10 @@ public class EventHandlerUtil {
throw new VelocityException("Exception in event handler.",e);
}
}
-
+
/**
* Called when an invalid method is encountered.
- *
+ *
* @param rsvc current instance of RuntimeServices
* @param context the context when the reference was found invalid
* @param reference complete invalid reference
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/app/event/IncludeEventHandler.java b/velocity-engine-core/src/main/java/org/apache/velocity/app/event/IncludeEventHandler.java
index e0571fe9..e0fd5b57 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/app/event/IncludeEventHandler.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/app/event/IncludeEventHandler.java
@@ -19,7 +19,7 @@ import org.apache.velocity.util.ContextAware;
* "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.
*/
/**
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/app/event/InvalidReferenceEventHandler.java b/velocity-engine-core/src/main/java/org/apache/velocity/app/event/InvalidReferenceEventHandler.java
index 747a58df..e5b5b362 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/app/event/InvalidReferenceEventHandler.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/app/event/InvalidReferenceEventHandler.java
@@ -16,17 +16,17 @@ package org.apache.velocity.app.event;
* "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.Context;
import org.apache.velocity.util.introspection.Info;
/**
- * Event handler called when an invalid reference is encountered. Allows
+ * Event handler called when an invalid reference is encountered. Allows
* the application to report errors or substitute return values. May be chained
* in sequence; the behavior will differ per method.
- *
+ *
* <p>This feature should be regarded as experimental.
*
* @author <a href="mailto:wglass@forio.com">Will Glass-Husain</a>
@@ -35,14 +35,14 @@ import org.apache.velocity.util.introspection.Info;
*/
public interface InvalidReferenceEventHandler extends EventHandler
{
-
+
/**
- * Called when object is null or there is no getter for the given
- * property. Also called for invalid references without properties.
+ * Called when object is null or there is no getter for the given
+ * property. Also called for invalid references without properties.
* invalidGetMethod() will be called in sequence for
* each link in the chain until the first non-null value is
* returned.
- *
+ *
* @param context the context when the reference was found invalid
* @param reference string with complete invalid reference
* @param object the object referred to, or null if not found
@@ -50,32 +50,32 @@ public interface InvalidReferenceEventHandler extends EventHandler
* @param info contains template, line, column details
* @return substitute return value for missing reference, or null if no substitute
*/
- public Object invalidGetMethod(Context context, String reference,
+ public Object invalidGetMethod(Context context, String reference,
Object object, String property, Info info);
/**
- * Called when object is null or there is no setter for the given
+ * Called when object is null or there is no setter for the given
* property. invalidSetMethod() will be called in sequence for
* each link in the chain until a true value is returned. It's
* recommended that false be returned as a default to allow
* for easy chaining.
- *
+ *
* @param context the context when the reference was found invalid
* @param leftreference left reference being assigned to
* @param rightreference invalid reference on the right
* @param info contains info on template, line, col
- *
- * @return if true then stop calling invalidSetMethod along the
+ *
+ * @return if true then stop calling invalidSetMethod along the
* chain.
*/
- public boolean invalidSetMethod(Context context, String leftreference,
+ public boolean invalidSetMethod(Context context, String leftreference,
String rightreference, Info info);
/**
* Called when object is null or the given method does not exist.
- * invalidMethod() will be called in sequence for each link in
- * the chain until the first non-null value is returned.
- *
+ * invalidMethod() will be called in sequence for each link in
+ * the chain until the first non-null value is returned.
+ *
* @param context the context when the reference was found invalid
* @param reference string with complete invalid reference
* @param object the object referred to, or null if not found
@@ -83,6 +83,6 @@ public interface InvalidReferenceEventHandler extends EventHandler
* @param info contains template, line, column details
* @return substitute return value for missing reference, or null if no substitute
*/
- public Object invalidMethod(Context context, String reference,
+ public Object invalidMethod(Context context, String reference,
Object object, String method, Info info);
}
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/app/event/MethodExceptionEventHandler.java b/velocity-engine-core/src/main/java/org/apache/velocity/app/event/MethodExceptionEventHandler.java
index 283ee658..9c7c0aff 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/app/event/MethodExceptionEventHandler.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/app/event/MethodExceptionEventHandler.java
@@ -20,7 +20,7 @@ import org.apache.velocity.util.introspection.Info;
* "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.
*/
/**
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/app/event/ReferenceInsertionEventHandler.java b/velocity-engine-core/src/main/java/org/apache/velocity/app/event/ReferenceInsertionEventHandler.java
index 90c01bfc..30906282 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/app/event/ReferenceInsertionEventHandler.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/app/event/ReferenceInsertionEventHandler.java
@@ -16,7 +16,7 @@ package org.apache.velocity.app.event;
* "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.Context;
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/app/event/implement/EscapeSqlReference.java b/velocity-engine-core/src/main/java/org/apache/velocity/app/event/implement/EscapeSqlReference.java
index df2408d5..8f8728e6 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/app/event/implement/EscapeSqlReference.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/app/event/implement/EscapeSqlReference.java
@@ -21,7 +21,7 @@ package org.apache.velocity.app.event.implement;
/**
* Escapes the characters in a String to be suitable to pass to an SQL query.
- *
+ *
* @author wglass
* @since 1.5
*/
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/app/event/implement/IncludeNotFound.java b/velocity-engine-core/src/main/java/org/apache/velocity/app/event/implement/IncludeNotFound.java
index 3e4671fd..ab7ffa20 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/app/event/implement/IncludeNotFound.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/app/event/implement/IncludeNotFound.java
@@ -16,7 +16,7 @@ package org.apache.velocity.app.event.implement;
* "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.IncludeEventHandler;
@@ -43,9 +43,9 @@ import org.slf4j.LoggerFactory;
* </PRE>
* </code>
* </p><p>
- * The name of the missing resource is put into the Velocity context, under the
- * key "missingResource", so that the "notfound" template can report the missing
- * resource with a Velocity reference, like:
+ * The name of the missing resource is put into the Velocity context, under the
+ * key "missingResource", so that the "notfound" template can report the missing
+ * resource with a Velocity reference, like:
* <code>$missingResource</code>
* </p>
*
@@ -67,7 +67,7 @@ public class IncludeNotFound implements IncludeEventHandler, RuntimeServicesAwar
* Check to see if included file exists, and display "not found" page if it
* doesn't. If "not found" page does not exist, log an error and return
* null.
- *
+ *
* @param includeResourcePath
* @param currentResourcePath
* @param directiveName
@@ -115,9 +115,9 @@ public class IncludeNotFound implements IncludeEventHandler, RuntimeServicesAwar
notfound = StringUtils.nullTrim(rs.getString(PROPERTY_NOT_FOUND, DEFAULT_NOT_FOUND));
}
- /**
+ /**
* @see org.apache.velocity.util.ContextAware#setContext(org.apache.velocity.context.Context)
- */
+ */
public void setContext(Context context)
{
this.context = context;
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/app/event/implement/IncludeRelativePath.java b/velocity-engine-core/src/main/java/org/apache/velocity/app/event/implement/IncludeRelativePath.java
index a83543b8..6010a35a 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/app/event/implement/IncludeRelativePath.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/app/event/implement/IncludeRelativePath.java
@@ -16,7 +16,7 @@ package org.apache.velocity.app.event.implement;
* "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.IncludeEventHandler;
@@ -35,7 +35,7 @@ public class IncludeRelativePath implements IncludeEventHandler {
/**
* Return path relative to the current template's path.
- *
+ *
* @param includeResourcePath the path as given in the include directive.
* @param currentResourcePath the path of the currently rendering template that includes the
* include directive.
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/app/event/implement/InvalidReferenceInfo.java b/velocity-engine-core/src/main/java/org/apache/velocity/app/event/implement/InvalidReferenceInfo.java
index 76a3a802..3529226a 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/app/event/implement/InvalidReferenceInfo.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/app/event/implement/InvalidReferenceInfo.java
@@ -16,15 +16,15 @@ package org.apache.velocity.app.event.implement;
* "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.util.introspection.Info;
/**
- * Convenience class to use when reporting out invalid syntax
+ * Convenience class to use when reporting out invalid syntax
* with line, column, and template name.
- *
+ *
* @author <a href="mailto:wglass@forio.com">Will Glass-Husain </a>
* @version $Id$
* @since 1.5
@@ -32,11 +32,11 @@ import org.apache.velocity.util.introspection.Info;
public class InvalidReferenceInfo extends Info
{
private String invalidReference;
-
+
public InvalidReferenceInfo(String invalidReference, Info info)
{
super(info.getTemplateName(),info.getLine(),info.getColumn());
- this.invalidReference = invalidReference;
+ this.invalidReference = invalidReference;
}
/**
@@ -47,8 +47,8 @@ public class InvalidReferenceInfo extends Info
{
return invalidReference;
}
-
-
+
+
/**
* Formats a textual representation of this object as <code>SOURCE
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/app/event/implement/PrintExceptions.java b/velocity-engine-core/src/main/java/org/apache/velocity/app/event/implement/PrintExceptions.java
index 808dad5e..c903ec71 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/app/event/implement/PrintExceptions.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/app/event/implement/PrintExceptions.java
@@ -16,7 +16,7 @@ package org.apache.velocity.app.event.implement;
* "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.MethodExceptionEventHandler;
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/app/event/implement/ReportInvalidReferences.java b/velocity-engine-core/src/main/java/org/apache/velocity/app/event/implement/ReportInvalidReferences.java
index f5881f90..42ffa919 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/app/event/implement/ReportInvalidReferences.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/app/event/implement/ReportInvalidReferences.java
@@ -16,7 +16,7 @@ package org.apache.velocity.app.event.implement;
* "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.InvalidReferenceEventHandler;
@@ -30,41 +30,41 @@ import java.util.ArrayList;
import java.util.List;
/**
- * Use this event handler to flag invalid references. Since this
+ * Use this event handler to flag invalid references. Since this
* is intended to be used for a specific request, this should be
* used as a local event handler attached to a specific context
* instead of being globally defined in the Velocity properties file.
- *
+ *
* <p>
* Note that InvalidReferenceHandler can be used
* in two modes. If the Velocity properties file contains the following:
* <pre>
* eventhandler.invalidreference.exception = true
* </pre>
- * then the event handler will throw a ParseErrorRuntimeException upon
- * hitting the first invalid reference. This stops processing and is
+ * then the event handler will throw a ParseErrorRuntimeException upon
+ * hitting the first invalid reference. This stops processing and is
* passed through to the application code. The ParseErrorRuntimeException
* contain information about the template name, line number, column number,
* and invalid reference.
- *
+ *
* <p>
- * If this configuration setting is false or omitted then the page
+ * If this configuration setting is false or omitted then the page
* will be processed as normal, but all invalid references will be collected
* in a List of InvalidReferenceInfo objects.
- *
+ *
* <p>This feature should be regarded as experimental.
- *
+ *
* @author <a href="mailto:wglass@forio.com">Will Glass-Husain</a>
* @version $Id$
* @since 1.5
*/
-public class ReportInvalidReferences implements
+public class ReportInvalidReferences implements
InvalidReferenceEventHandler, RuntimeServicesAware
{
public static final String EVENTHANDLER_INVALIDREFERENCE_EXCEPTION = "eventhandler.invalidreference.exception";
-
- /**
+
+ /**
* List of InvalidReferenceInfo objects
*/
List invalidReferences = new ArrayList();
@@ -73,8 +73,8 @@ public class ReportInvalidReferences implements
* If true, stop at the first invalid reference and throw an exception.
*/
private boolean stopOnFirstInvalidReference = false;
-
-
+
+
/**
* Collect the error and/or throw an exception, depending on configuration.
*
@@ -86,7 +86,7 @@ public class ReportInvalidReferences implements
* @return always returns null
* @throws ParseErrorException
*/
- public Object invalidGetMethod(Context context, String reference, Object object,
+ public Object invalidGetMethod(Context context, String reference, Object object,
String property, Info info)
{
reportInvalidReference(reference, info);
@@ -104,7 +104,7 @@ public class ReportInvalidReferences implements
* @return always returns null
* @throws ParseErrorException
*/
- public Object invalidMethod(Context context, String reference, Object object,
+ public Object invalidMethod(Context context, String reference, Object object,
String method, Info info)
{
if (reference == null)
@@ -135,9 +135,9 @@ public class ReportInvalidReferences implements
/**
- * Check for an invalid reference and collect the error or throw an exception
+ * Check for an invalid reference and collect the error or throw an exception
* (depending on configuration).
- *
+ *
* @param reference the invalid reference
* @param info line, column, template name
*/
@@ -145,7 +145,7 @@ public class ReportInvalidReferences implements
{
InvalidReferenceInfo invalidReferenceInfo = new InvalidReferenceInfo(reference, info);
invalidReferences.add(invalidReferenceInfo);
-
+
if (stopOnFirstInvalidReference)
{
throw new ParseErrorException(
@@ -164,7 +164,7 @@ public class ReportInvalidReferences implements
{
return invalidReferences;
}
-
+
/**
* Called automatically when event cartridge is initialized.
@@ -174,7 +174,7 @@ public class ReportInvalidReferences implements
{
stopOnFirstInvalidReference = rs.getConfiguration().getBoolean(
EVENTHANDLER_INVALIDREFERENCE_EXCEPTION,
- false);
+ false);
}
-
+
}
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/context/AbstractContext.java b/velocity-engine-core/src/main/java/org/apache/velocity/context/AbstractContext.java
index e61ab346..1bb976f6 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/context/AbstractContext.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/context/AbstractContext.java
@@ -16,7 +16,7 @@ package org.apache.velocity.context;
* "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.
*/
/**
@@ -225,7 +225,7 @@ public abstract class AbstractContext extends InternalContextBase
{
exists = innerContext.containsKey(key);
}
-
+
return exists;
}
@@ -267,6 +267,3 @@ public abstract class AbstractContext extends InternalContextBase
}
}
-
-
-
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/context/ChainedInternalContextAdapter.java b/velocity-engine-core/src/main/java/org/apache/velocity/context/ChainedInternalContextAdapter.java
index 4b6d6d3d..9d6cb107 100755
--- a/velocity-engine-core/src/main/java/org/apache/velocity/context/ChainedInternalContextAdapter.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/context/ChainedInternalContextAdapter.java
@@ -16,7 +16,7 @@ package org.apache.velocity.context;
* "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.EventCartridge;
@@ -43,7 +43,7 @@ public abstract class ChainedInternalContextAdapter implements InternalContextAd
{
/** the parent context */
protected InternalContextAdapter wrappedContext = null;
-
+
/**
* CTOR, wraps an ICA
* @param inner context
@@ -52,7 +52,7 @@ public abstract class ChainedInternalContextAdapter implements InternalContextAd
{
wrappedContext = inner;
}
-
+
/**
* Return the inner / user context.
* @return The inner / user context.
@@ -215,7 +215,7 @@ public abstract class ChainedInternalContextAdapter implements InternalContextAd
{
wrappedContext.setMacroLibraries(macroLibraries);
}
-
+
/**
* @see org.apache.velocity.context.InternalHousekeepingContext#getMacroLibraries()
*/
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/context/Context.java b/velocity-engine-core/src/main/java/org/apache/velocity/context/Context.java
index 8b243463..f0d51f8f 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/context/Context.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/context/Context.java
@@ -16,7 +16,7 @@ package org.apache.velocity.context;
* "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.
*/
/**
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/context/InternalContextAdapter.java b/velocity-engine-core/src/main/java/org/apache/velocity/context/InternalContextAdapter.java
index 5c6d8f14..99f96d8c 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/context/InternalContextAdapter.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/context/InternalContextAdapter.java
@@ -16,7 +16,7 @@ package org.apache.velocity.context;
* "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.
*/
/**
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/context/InternalContextAdapterImpl.java b/velocity-engine-core/src/main/java/org/apache/velocity/context/InternalContextAdapterImpl.java
index 03d9edfe..ee086494 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/context/InternalContextAdapterImpl.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/context/InternalContextAdapterImpl.java
@@ -16,7 +16,7 @@ package org.apache.velocity.context;
* "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.EventCartridge;
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/context/InternalContextBase.java b/velocity-engine-core/src/main/java/org/apache/velocity/context/InternalContextBase.java
index e833d3d7..b2376368 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/context/InternalContextBase.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/context/InternalContextBase.java
@@ -16,7 +16,7 @@ package org.apache.velocity.context;
* "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.EventCartridge;
@@ -254,5 +254,3 @@ class InternalContextBase implements InternalHousekeepingContext, InternalEventC
return eventCartridge;
}
}
-
-
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/context/InternalEventContext.java b/velocity-engine-core/src/main/java/org/apache/velocity/context/InternalEventContext.java
index f870fa40..9133a538 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/context/InternalEventContext.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/context/InternalEventContext.java
@@ -16,7 +16,7 @@ package org.apache.velocity.context;
* "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.EventCartridge;
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/context/InternalHousekeepingContext.java b/velocity-engine-core/src/main/java/org/apache/velocity/context/InternalHousekeepingContext.java
index d774c4d2..8a6b9d4e 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/context/InternalHousekeepingContext.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/context/InternalHousekeepingContext.java
@@ -16,7 +16,7 @@ package org.apache.velocity.context;
* "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.resource.Resource;
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/context/InternalWrapperContext.java b/velocity-engine-core/src/main/java/org/apache/velocity/context/InternalWrapperContext.java
index 7dbbbb46..5706142e 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/context/InternalWrapperContext.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/context/InternalWrapperContext.java
@@ -16,7 +16,7 @@ package org.apache.velocity.context;
* "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.
*/
/**
@@ -27,7 +27,7 @@ package org.apache.velocity.context;
*/
public interface InternalWrapperContext
{
-
+
/**
* Returns the wrapped user context.
* @return The wrapped user context.
@@ -45,15 +45,15 @@ public interface InternalWrapperContext
* Retrieve the specified key value pair from the given scope.
*/
Object put(String key, Object value);
-
+
/**
* Place key value pair into the context of the specified scope.
*/
Object get(String key);
-
+
/**
* Tests if the key exists in the specified scope
*/
boolean containsKey(String key);
-
+
}
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/exception/ExtendedParseException.java b/velocity-engine-core/src/main/java/org/apache/velocity/exception/ExtendedParseException.java
index cc23b581..17f46416 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/exception/ExtendedParseException.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/exception/ExtendedParseException.java
@@ -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.
*/
/**
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/exception/MathException.java b/velocity-engine-core/src/main/java/org/apache/velocity/exception/MathException.java
index 525af330..b92826a8 100755
--- a/velocity-engine-core/src/main/java/org/apache/velocity/exception/MathException.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/exception/MathException.java
@@ -16,11 +16,11 @@ 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.
*/
/**
- * Separate exception class to distinguish math problems.
+ * Separate exception class to distinguish math problems.
*
* @author Nathan Bubna
* @since 1.6
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/exception/MethodInvocationException.java b/velocity-engine-core/src/main/java/org/apache/velocity/exception/MethodInvocationException.java
index 1fbc1ea6..35d682b3 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/exception/MethodInvocationException.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/exception/MethodInvocationException.java
@@ -42,7 +42,7 @@ public class MethodInvocationException extends VelocityException implements Exte
private String referenceName = "";
private final String methodName;
-
+
private final int lineNumber;
private final int columnNumber;
private final String templateName;
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/exception/ParseErrorException.java b/velocity-engine-core/src/main/java/org/apache/velocity/exception/ParseErrorException.java
index 5244881a..faba2ae1 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/exception/ParseErrorException.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/exception/ParseErrorException.java
@@ -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 VelocityException
* 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 VelocityException
}
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 VelocityException
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 VelocityException
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 VelocityException
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 VelocityException
/**
* 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 VelocityException
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 VelocityException
/**
* 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
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/exception/ResourceNotFoundException.java b/velocity-engine-core/src/main/java/org/apache/velocity/exception/ResourceNotFoundException.java
index 477d516a..f900380d 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/exception/ResourceNotFoundException.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/exception/ResourceNotFoundException.java
@@ -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.
*/
/**
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/exception/TemplateInitException.java b/velocity-engine-core/src/main/java/org/apache/velocity/exception/TemplateInitException.java
index 8b6b2f47..186ba5ba 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/exception/TemplateInitException.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/exception/TemplateInitException.java
@@ -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.parser.ParseException;
* @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 extends VelocityException
return col;
}
-
-
-
+
+
+
}
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/exception/VelocityException.java b/velocity-engine-core/src/main/java/org/apache/velocity/exception/VelocityException.java
index 40ede042..8dccb151 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/exception/VelocityException.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/exception/VelocityException.java
@@ -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:kdowney@amberarcher.com">Kyle F. Downey</a>
* @version $Id$
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/io/Filter.java b/velocity-engine-core/src/main/java/org/apache/velocity/io/Filter.java
index c07adb70..2ff2e8bd 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/io/Filter.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/io/Filter.java
@@ -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;
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/io/VelocityWriter.java b/velocity-engine-core/src/main/java/org/apache/velocity/io/VelocityWriter.java
index 7d81dcf8..c09681b0 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/io/VelocityWriter.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/io/VelocityWriter.java
@@ -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 extends Writer implements Filter
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 extends Writer implements Filter
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);
}
-
+
}
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/ParserPool.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/ParserPool.java
index b92ebbbf..0af4403c 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/ParserPool.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/ParserPool.java
@@ -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;
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/ParserPoolImpl.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/ParserPoolImpl.java
index 3e890e02..8ce0fb09 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/ParserPoolImpl.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/ParserPoolImpl.java
@@ -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;
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 2294cabc..88f3cc32 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
@@ -227,11 +227,11 @@ public class RuntimeInstance implements RuntimeConstants, RuntimeServices
{
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 RuntimeConstants, RuntimeServices
initializeDirectives();
initializeEventHandlers();
initializeParserPool();
-
+
initializeIntrospection();
initializeEvaluateScopeSettings();
/*
@@ -247,9 +247,9 @@ public class RuntimeInstance implements RuntimeConstants, RuntimeServices
* accessible from Runtime, so keep this here at the end.
*/
vmFactory.initVelocimacro();
-
+
log.trace("RuntimeInstance successfully initialized.");
-
+
initialized = true;
initializing = false;
}
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 b25a5b45..8e80829c 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
@@ -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;
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 3096d43a..e4986028 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
@@ -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
}
}
}
-
-
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 21b49da8..ab747df7 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
@@ -16,7 +16,7 @@ package org.apache.velocity.runtime.directive;
* "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)
* &lt;strong&gt;$bodyContent&lt;/strong&gt; $txt
* #end
@@ -50,7 +50,7 @@ import java.io.Writer;
* <pre>
* &lt;strong&gt;&lt;u&gt;This text is underlined and bold&lt;u&gt;&lt;/strong&gt; yeah!
* </pre>
- *
+ *
* bodyContent reference name is configurable (see velocity.properties).
*
* @author <a href="mailto:wyla@removethis.sci.fi">Jarkko Viinamaki</a>
@@ -79,7 +79,7 @@ public class BlockMacro extends Block
/**
* Initializes the directive.
- *
+ *
* @param rs
* @param context
* @param node
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Break.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Break.java
index 5583667c..e1c061ed 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Break.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Break.java
@@ -16,7 +16,7 @@ package org.apache.velocity.runtime.directive;
* "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);
}
- }
-
+ }
+
}
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Define.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Define.java
index cc1cdbc2..149587e4 100755
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Define.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Define.java
@@ -16,7 +16,7 @@ package org.apache.velocity.runtime.directive;
* "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);
}
}
}
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/DirectiveConstants.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/DirectiveConstants.java
index 6b26d176..91834af8 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/DirectiveConstants.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/DirectiveConstants.java
@@ -16,7 +16,7 @@ package org.apache.velocity.runtime.directive;
* "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.
*/
/**
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Evaluate.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Evaluate.java
index 2366ce27..0d60d449 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Evaluate.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Evaluate.java
@@ -16,7 +16,7 @@ package org.apache.velocity.runtime.directive;
* "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);
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 468088ff..b0c92c9d 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
@@ -16,7 +16,7 @@ package org.apache.velocity.runtime.directive;
* "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);
}
- }
+ }
}
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/ForeachScope.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/ForeachScope.java
index 34c0ba60..d1267552 100755
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/ForeachScope.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/ForeachScope.java
@@ -16,7 +16,7 @@ package org.apache.velocity.runtime.directive;
* "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.
*/
/**
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Include.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Include.java
index 2d04c0b2..6e981ac5 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Include.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Include.java
@@ -16,7 +16,7 @@ package org.apache.velocity.runtime.directive;
* "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
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/InputBase.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/InputBase.java
index 00f0ee35..c12626a4 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/InputBase.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/InputBase.java
@@ -16,7 +16,7 @@ package org.apache.velocity.runtime.directive;
* "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;
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Macro.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Macro.java
index fa084907..c509b164 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Macro.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Macro.java
@@ -16,7 +16,7 @@ package org.apache.velocity.runtime.directive;
* "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;
- }
-
+ }
+
}
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/MacroParseException.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/MacroParseException.java
index f487c122..ab71207d 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/MacroParseException.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/MacroParseException.java
@@ -16,7 +16,7 @@ package org.apache.velocity.runtime.directive;
* "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;
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Parse.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Parse.java
index 21a8bc56..e5c22bfb 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Parse.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Parse.java
@@ -16,7 +16,7 @@ package org.apache.velocity.runtime.directive;
* "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);
}
}
}
-
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 940c1187..b2171059 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
@@ -16,7 +16,7 @@ package org.apache.velocity.runtime.directive;
* "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;
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Stop.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Stop.java
index 35548afa..3df68991 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Stop.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Stop.java
@@ -16,7 +16,7 @@ package org.apache.velocity.runtime.directive;
* "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);
}
- }
+ }
}
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/StopCommand.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/StopCommand.java
index 4e466fd0..92f9a1b4 100755
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/StopCommand.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/StopCommand.java
@@ -16,7 +16,7 @@ package org.apache.velocity.runtime.directive;
* "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;
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 f7c1c5ce..0906b522 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
@@ -16,7 +16,7 @@ package org.apache.velocity.runtime.directive;
* "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 Directive
/**
* sets the directive name of this VM
- *
+ *
* @param name
*/
public void setName(String name)
@@ -89,7 +89,7 @@ public class VelocimacroProxy extends Directive
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 Directive
{
return macroArgs;
}
-
+
/**
* @param tree
*/
@@ -124,7 +124,7 @@ 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()
@@ -139,7 +139,7 @@ public class VelocimacroProxy extends Directive
{
rsvc = rs;
log = rs.getLog("macro");
-
+
strictArguments = rsvc.getBoolean(
RuntimeConstants.VM_ARGUMENTS_STRICT, false);
@@ -158,7 +158,7 @@ public class VelocimacroProxy extends Directive
/**
* 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 Directive
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 Directive
}
}
}
-
+
/**
* Check whether the number of arguments given matches the number defined.
*/
@@ -252,7 +252,7 @@ public class VelocimacroProxy extends Directive
{
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 Directive
}
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 Directive
{
// 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 Directive
// return the array of replaced and new values
return values;
}
-
-}
+}
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/contrib/For.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/contrib/For.java
index a8f08761..6d98ad79 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/contrib/For.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/contrib/For.java
@@ -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(
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 db7452b6..3445800c 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
@@ -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.
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 ade1a1b5..f24f1968 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
@@ -16,7 +16,7 @@ package org.apache.velocity.runtime.parser;
* "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;
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/VelocityCharStream.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/VelocityCharStream.java
index c35ed1c7..4c381b11 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/VelocityCharStream.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/VelocityCharStream.java
@@ -16,7 +16,7 @@ package org.apache.velocity.runtime.parser;
* "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;
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTAddNode.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTAddNode.java
index c5a91559..94598fbb 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTAddNode.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTAddNode.java
@@ -16,7 +16,7 @@ package org.apache.velocity.runtime.parser.node;
* "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 ASTMathNode
}
}
-
-
-
-
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 d5436d84..84ab7be9 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
@@ -16,7 +16,7 @@ package org.apache.velocity.runtime.parser.node;
* "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 ASTLogicalOperator
return false;
}
}
-
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTAssignment.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTAssignment.java
index a907ce42..673d1510 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTAssignment.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTAssignment.java
@@ -16,7 +16,7 @@ package org.apache.velocity.runtime.parser.node;
* "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 SimpleNode
{
return visitor.visit(this, data);
}
-
+
/**
* @throws TemplateInitException
* @see org.apache.velocity.runtime.parser.node.Node#init(org.apache.velocity.context.InternalContextAdapter, java.lang.Object)
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTBlock.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTBlock.java
index 02725a5f..48cf1d68 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTBlock.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTBlock.java
@@ -16,7 +16,7 @@ package org.apache.velocity.runtime.parser.node;
* "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
*/
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTComment.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTComment.java
index 6549bea6..3c9e88b2 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTComment.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTComment.java
@@ -16,7 +16,7 @@ package org.apache.velocity.runtime.parser.node;
* "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 SimpleNode
{
carr = t.image.substring(0, (loc1 == -1) ? loc2 : loc1).toCharArray();
}
-
+
cleanupParserAndTokens();
return data;
@@ -103,5 +103,5 @@ public class ASTComment extends SimpleNode
writer.write(carr);
return true;
}
-
+
}
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 183c2868..fbf2c1b6 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
@@ -16,7 +16,7 @@ package org.apache.velocity.runtime.parser.node;
* "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;
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTDirective.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTDirective.java
index 5c29b66d..55853795 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTDirective.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTDirective.java
@@ -212,11 +212,11 @@ public class ASTDirective extends SimpleNode
die.getLineNumber() + getLine());
}
isDirective = true;
-
+
}
isInitialized = true;
-
+
saveTokenImages();
cleanupParserAndTokens();
}
@@ -225,7 +225,7 @@ public class ASTDirective extends SimpleNode
{
NodeUtils.fixIndentation(this, prefix);
}
-
+
return data;
}
@@ -345,6 +345,3 @@ public class ASTDirective extends SimpleNode
}
}
-
-
-
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTDirectiveAssign.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTDirectiveAssign.java
index a69ce49d..67efed75 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTDirectiveAssign.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTDirectiveAssign.java
@@ -34,7 +34,7 @@ public class ASTDirectiveAssign extends SimpleNode
{
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 SimpleNode
cleanupParserAndTokens(); // drop reference to Parser and all JavaCC Tokens
return obj;
}
-
+
}
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTDivNode.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTDivNode.java
index b7300be2..977226d2 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTDivNode.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTDivNode.java
@@ -16,7 +16,7 @@ package org.apache.velocity.runtime.parser.node;
* "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;
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTEQNode.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTEQNode.java
index a25f10ee..61f92257 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTEQNode.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTEQNode.java
@@ -16,7 +16,7 @@ package org.apache.velocity.runtime.parser.node;
* "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;
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTElseIfStatement.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTElseIfStatement.java
index 92b8ec6c..6ecf3fef 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTElseIfStatement.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTElseIfStatement.java
@@ -16,7 +16,7 @@ package org.apache.velocity.runtime.parser.node;
* "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;
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTElseStatement.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTElseStatement.java
index 7fffca22..5f3ac669 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTElseStatement.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTElseStatement.java
@@ -16,7 +16,7 @@ package org.apache.velocity.runtime.parser.node;
* "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 SimpleNode
{
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 SimpleNode
return obj;
}
}
-
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTEscape.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTEscape.java
index 12d31638..452b275b 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTEscape.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTEscape.java
@@ -16,7 +16,7 @@ package org.apache.velocity.runtime.parser.node;
* "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;
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTEscapedDirective.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTEscapedDirective.java
index 62a0fa37..05a85f78 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTEscapedDirective.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTEscapedDirective.java
@@ -16,7 +16,7 @@ package org.apache.velocity.runtime.parser.node;
* "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 SimpleNode
writer.write(firstImage);
return true;
}
-
+
/**
* @throws TemplateInitException
* @see org.apache.velocity.runtime.parser.node.Node#init(org.apache.velocity.context.InternalContextAdapter, java.lang.Object)
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTExpression.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTExpression.java
index 4bd01d1d..2dc36721 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTExpression.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTExpression.java
@@ -16,7 +16,7 @@ package org.apache.velocity.runtime.parser.node;
* "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 SimpleNode
{
return jjtGetChild(0).value(context);
}
-
+
/**
* @throws TemplateInitException
* @see org.apache.velocity.runtime.parser.node.Node#init(org.apache.velocity.context.InternalContextAdapter, java.lang.Object)
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTFalse.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTFalse.java
index 4c30d9d7..c55c3c2a 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTFalse.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTFalse.java
@@ -16,7 +16,7 @@ package org.apache.velocity.runtime.parser.node;
* "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)
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTFloatingPointLiteral.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTFloatingPointLiteral.java
index f881fd69..3c7315bc 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTFloatingPointLiteral.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTFloatingPointLiteral.java
@@ -16,7 +16,7 @@ package org.apache.velocity.runtime.parser.node;
* "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;
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTGENode.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTGENode.java
index d69470c3..fb4112a9 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTGENode.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTGENode.java
@@ -16,7 +16,7 @@ package org.apache.velocity.runtime.parser.node;
* "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;
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTGTNode.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTGTNode.java
index 3ed10599..0065f27a 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTGTNode.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTGTNode.java
@@ -16,7 +16,7 @@ package org.apache.velocity.runtime.parser.node;
* "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;
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTIdentifier.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTIdentifier.java
index e01f4754..9bd52633 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTIdentifier.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTIdentifier.java
@@ -16,7 +16,7 @@ package org.apache.velocity.runtime.parser.node;
* "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 SimpleNode
* 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 SimpleNode
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 SimpleNode
{
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());
}
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTIfStatement.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTIfStatement.java
index e433b9a2..31e1fbb4 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTIfStatement.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTIfStatement.java
@@ -16,7 +16,7 @@ package org.apache.velocity.runtime.parser.node;
* "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 SimpleNode
public void process( InternalContextAdapter context, ParserVisitor visitor)
{
}
-} \ No newline at end of file
+}
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTIncludeStatement.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTIncludeStatement.java
index 6ed3667b..c166c1c4 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTIncludeStatement.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTIncludeStatement.java
@@ -16,7 +16,7 @@ package org.apache.velocity.runtime.parser.node;
* "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;
@@ -53,7 +53,7 @@ public class ASTIncludeStatement extends SimpleNode
{
return visitor.visit(this, data);
}
-
+
/**
* @throws TemplateInitException
* @see org.apache.velocity.runtime.parser.node.Node#init(org.apache.velocity.context.InternalContextAdapter, java.lang.Object)
@@ -64,5 +64,5 @@ public class ASTIncludeStatement extends SimpleNode
cleanupParserAndTokens(); // drop reference to Parser and all JavaCC Tokens
return obj;
}
-
+
}
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 3d3889b2..3bafd5b7 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
@@ -44,7 +44,7 @@ import org.apache.velocity.util.introspection.VelMethod;
* "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.
*/
/**
@@ -70,45 +70,45 @@ public class ASTIndex extends SimpleNode
{
super(p, i);
}
-
+
public Object init(InternalContextAdapter context, Object data)
throws TemplateInitException
{
- super.init(context, data);
+ super.init(context, data);
strictRef = rsvc.getBoolean(RuntimeConstants.RUNTIME_REFERENCES_STRICT, false);
cleanupParserAndTokens();
return data;
- }
+ }
+
-
private final static Object[] noParams = {};
- private final static Class[] noTypes = {};
+ private final static Class[] noTypes = {};
/**
- * If argument is an Integer and negative, then return (o.size() - argument).
+ * 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 context Used to access the method cache.
* @param node ASTNode used for error reporting.
*/
- public static Object adjMinusIndexArg(Object argument, Object o,
+ public static Object adjMinusIndexArg(Object argument, Object o,
InternalContextAdapter context, SimpleNode node)
{
if (argument instanceof Integer && ((Integer)argument).intValue() < 0)
{
// The index value is a negative number, $foo[-1], so we want to actually
// Index [size - value], so try and call the size method.
- VelMethod method = ClassUtils.getMethod("size", noParams, noTypes,
+ VelMethod method = ClassUtils.getMethod("size", noParams, noTypes,
o, context, node, false);
if (method == null)
{
// The object doesn't have a size method, so there is no notion of "at the end"
throw new VelocityException(
"A 'size()' method required for negative value "
- + ((Integer)argument).intValue() + " does not exist for class '"
+ + ((Integer)argument).intValue() + " does not exist for class '"
+ o.getClass().getName() + "' at " + StringUtils.formatFileString(node));
- }
+ }
Object size = null;
try
@@ -120,8 +120,8 @@ public class ASTIndex extends SimpleNode
throw new VelocityException("Error trying to calls the 'size()' method on '"
+ o.getClass().getName() + "' at " + StringUtils.formatFileString(node), e);
}
-
- int sizeint = 0;
+
+ int sizeint = 0;
try
{
sizeint = ((Integer)size).intValue();
@@ -129,18 +129,18 @@ public class ASTIndex extends SimpleNode
catch (ClassCastException e)
{
// If size() doesn't return an Integer we want to report a pretty error
- throw new VelocityException("Method 'size()' on class '"
+ throw new VelocityException("Method 'size()' on class '"
+ o.getClass().getName() + "' returned '" + size.getClass().getName()
+ "' when Integer was expected at " + StringUtils.formatFileString(node));
}
-
+
argument = Integer.valueOf(sizeint + ((Integer)argument).intValue());
}
-
+
// Nothing to do, return the original argument
return argument;
}
-
+
public Object execute(Object o, InternalContextAdapter context)
throws MethodInvocationException
{
@@ -150,11 +150,11 @@ public class ASTIndex extends SimpleNode
Object [] params = {argument};
Class[] paramClasses = {argument == null ? null : argument.getClass()};
- VelMethod method = ClassUtils.getMethod(methodName, params, paramClasses,
+ VelMethod method = ClassUtils.getMethod(methodName, params, paramClasses,
o, context, this, strictRef);
if (method == null) return null;
-
+
try
{
/*
@@ -187,11 +187,11 @@ public class ASTIndex extends SimpleNode
catch( Exception e )
{
String msg = "Error invoking method 'get("
- + (argument == null ? "null" : argument.getClass().getName())
+ + (argument == null ? "null" : argument.getClass().getName())
+ ")' in " + o.getClass().getName()
+ " at " + StringUtils.formatFileString(this);
log.error(msg, e);
throw new VelocityException(msg, e);
}
- }
+ }
}
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTIntegerLiteral.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTIntegerLiteral.java
index 49e56d5c..380a5ded 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTIntegerLiteral.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTIntegerLiteral.java
@@ -16,7 +16,7 @@ package org.apache.velocity.runtime.parser.node;
* "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;
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTIntegerRange.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTIntegerRange.java
index 5ac76e24..34a989b9 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTIntegerRange.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTIntegerRange.java
@@ -16,7 +16,7 @@ package org.apache.velocity.runtime.parser.node;
* "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;
@@ -143,7 +143,7 @@ public class ASTIntegerRange extends SimpleNode
return elements;
}
-
+
/**
* @throws TemplateInitException
* @see org.apache.velocity.runtime.parser.node.Node#init(org.apache.velocity.context.InternalContextAdapter, java.lang.Object)
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTLENode.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTLENode.java
index c7d0cac0..53a07f99 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTLENode.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTLENode.java
@@ -16,7 +16,7 @@ package org.apache.velocity.runtime.parser.node;
* "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;
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTLTNode.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTLTNode.java
index 1a7e4cbe..c381406e 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTLTNode.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTLTNode.java
@@ -16,7 +16,7 @@ package org.apache.velocity.runtime.parser.node;
* "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;
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTMap.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTMap.java
index 4845025c..fae69ee2 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTMap.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTMap.java
@@ -16,7 +16,7 @@ package org.apache.velocity.runtime.parser.node;
* "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;
@@ -85,7 +85,7 @@ public class ASTMap extends SimpleNode
return objectMap;
}
-
+
/**
* @throws TemplateInitException
* @see org.apache.velocity.runtime.parser.node.Node#init(org.apache.velocity.context.InternalContextAdapter, java.lang.Object)
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 3f4855aa..069f7df2 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
@@ -16,7 +16,7 @@ package org.apache.velocity.runtime.parser.node;
* "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;
@@ -151,7 +151,3 @@ public abstract class ASTMathNode extends ASTBinaryOperator
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/ASTMethod.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTMethod.java
index 3285e429..d5869fcc 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTMethod.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTMethod.java
@@ -122,7 +122,7 @@ public class ASTMethod extends SimpleNode
strictRef = rsvc.getBoolean(RuntimeConstants.RUNTIME_REFERENCES_STRICT, false);
cleanupParserAndTokens();
-
+
return data;
}
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTModNode.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTModNode.java
index 6bca112e..69f0559a 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTModNode.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTModNode.java
@@ -16,7 +16,7 @@ package org.apache.velocity.runtime.parser.node;
* "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 ASTModNode extends ASTMathNode
}
return MathUtils.modulo(left, right);
}
-
+
/**
* @throws TemplateInitException
* @see org.apache.velocity.runtime.parser.node.Node#init(org.apache.velocity.context.InternalContextAdapter, java.lang.Object)
@@ -87,7 +87,7 @@ public class ASTModNode extends ASTMathNode
cleanupParserAndTokens(); // drop reference to Parser and all JavaCC Tokens
return obj;
}
-
+
@Override
public String getLiteralOperator()
{
@@ -95,4 +95,3 @@ public class ASTModNode extends ASTMathNode
}
}
-
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTMulNode.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTMulNode.java
index b3106488..5ded7b30 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTMulNode.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTMulNode.java
@@ -16,7 +16,7 @@ package org.apache.velocity.runtime.parser.node;
* "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;
@@ -58,7 +58,7 @@ public class ASTMulNode extends ASTMathNode
{
return MathUtils.multiply(left, right);
}
-
+
/**
* @throws TemplateInitException
* @see org.apache.velocity.runtime.parser.node.Node#init(org.apache.velocity.context.InternalContextAdapter, java.lang.Object)
@@ -69,7 +69,7 @@ public class ASTMulNode extends ASTMathNode
cleanupParserAndTokens(); // drop reference to Parser and all JavaCC Tokens
return obj;
}
-
+
@Override
public String getLiteralOperator()
{
@@ -77,7 +77,3 @@ public class ASTMulNode extends ASTMathNode
}
}
-
-
-
-
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTNENode.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTNENode.java
index 85986847..3f78f5ab 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTNENode.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTNENode.java
@@ -16,7 +16,7 @@ package org.apache.velocity.runtime.parser.node;
* "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;
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTNotNode.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTNotNode.java
index 650fc557..a3c41ab5 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTNotNode.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTNotNode.java
@@ -16,7 +16,7 @@ package org.apache.velocity.runtime.parser.node;
* "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;
@@ -75,7 +75,7 @@ public class ASTNotNode extends SimpleNode
{
return (jjtGetChild(0).evaluate( context ) ? Boolean.FALSE : Boolean.TRUE) ;
}
-
+
/**
* @throws TemplateInitException
* @see org.apache.velocity.runtime.parser.node.Node#init(org.apache.velocity.context.InternalContextAdapter, java.lang.Object)
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTObjectArray.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTObjectArray.java
index eb7e6722..aa900698 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTObjectArray.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTObjectArray.java
@@ -16,7 +16,7 @@ package org.apache.velocity.runtime.parser.node;
* "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 ASTObjectArray extends SimpleNode
return objectArray;
}
-
+
/**
* @throws TemplateInitException
* @see org.apache.velocity.runtime.parser.node.Node#init(org.apache.velocity.context.InternalContextAdapter, java.lang.Object)
@@ -87,5 +87,5 @@ public class ASTObjectArray extends SimpleNode
cleanupParserAndTokens(); // drop reference to Parser and all JavaCC Tokens
return obj;
}
-
+
}
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 aa202ee1..3b81a7ea 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
@@ -16,7 +16,7 @@ package org.apache.velocity.runtime.parser.node;
* "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;
@@ -112,8 +112,3 @@ public class ASTOrNode extends ASTLogicalOperator
return false;
}
}
-
-
-
-
-
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTParameters.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTParameters.java
index d782f4e0..3b73ad8c 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTParameters.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTParameters.java
@@ -16,7 +16,7 @@ package org.apache.velocity.runtime.parser.node;
* "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;
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 313d55f1..c8f713bc 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
@@ -16,7 +16,7 @@ package org.apache.velocity.runtime.parser.node;
* "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;
@@ -78,19 +78,19 @@ public class ASTReference extends SimpleNode
* Indicates if we are running in strict reference mode.
*/
public boolean strictRef = false;
-
+
/**
* non null Indicates if we are setting an index reference e.g, $foo[2], which basically
* means that the last syntax of the reference are brackets.
*/
private ASTIndex astIndex = null;
-
+
/**
* Indicates if we are using modified escape behavior in strict mode.
* mainly we allow \$abc -> to render as $abc
*/
public boolean strictEscape = false;
-
+
private int numChildren = 0;
protected Info uberInfo;
@@ -127,10 +127,10 @@ public class ASTReference extends SimpleNode
throws TemplateInitException
{
super.init(context, data);
-
+
strictEscape = rsvc.getBoolean(RuntimeConstants.RUNTIME_REFERENCES_STRICT_ESCAPE, false);
strictRef = rsvc.getBoolean(RuntimeConstants.RUNTIME_REFERENCES_STRICT, false);
-
+
/*
* the only thing we can do in init() is getRoot()
* as that is template based, not context based,
@@ -140,10 +140,10 @@ public class ASTReference extends SimpleNode
rootString = rsvc.useStringInterning() ? getRoot().intern() : getRoot();
numChildren = jjtGetNumChildren();
-
+
// This is an expensive call, so get it now.
literal = literal();
-
+
/*
* and if appropriate...
*/
@@ -156,7 +156,7 @@ public class ASTReference extends SimpleNode
else
identifier = lastNode.getFirstTokenImage();
}
-
+
/*
* make an uberinfo - saves new's later on
@@ -171,14 +171,14 @@ public class ASTReference extends SimpleNode
/**
* In the case we are referencing a variable with #if($foo) or
- * #if( ! $foo) then we allow variables to be undefined and we
+ * #if( ! $foo) then we allow variables to be undefined and we
* set strictRef to false so that if the variable is undefined
- * an exception is not thrown.
+ * an exception is not thrown.
*/
if (strictRef && numChildren == 0)
{
logOnNull = false; // Strict mode allows nulls
-
+
Node node = this.jjtGetParent();
if (node instanceof ASTNotNode // #if( ! $foo)
|| node instanceof ASTExpression // #if( $foo )
@@ -199,7 +199,7 @@ public class ASTReference extends SimpleNode
}
saveTokenImages();
cleanupParserAndTokens();
-
+
return data;
}
@@ -254,7 +254,7 @@ public class ASTReference extends SimpleNode
return EventHandlerUtil.invalidGetMethod(rsvc, context,
"$" + rootString, null, null, uberInfo);
}
-
+
/*
* otherwise, simply return null
*/
@@ -276,7 +276,7 @@ public class ASTReference extends SimpleNode
try
{
- Object previousResult = result;
+ Object previousResult = result;
int failedChild = -1;
for (int i = 0; i < numChildren; i++)
{
@@ -287,10 +287,10 @@ public class ASTReference extends SimpleNode
* to call a method or property on a null value.
*/
String name = jjtGetChild(i).getFirstTokenImage();
- throw new VelocityException("Attempted to access '"
+ throw new VelocityException("Attempted to access '"
+ name + "' on a null value at "
+ StringUtils.formatFileString(uberInfo.getTemplateName(),
- + jjtGetChild(i).getLine(), jjtGetChild(i).getColumn()));
+ + jjtGetChild(i).getLine(), jjtGetChild(i).getColumn()));
}
previousResult = result;
result = jjtGetChild(i).execute(result,context);
@@ -356,9 +356,9 @@ public class ASTReference extends SimpleNode
}
}
}
-
+
}
-
+
return result;
}
catch(MethodInvocationException mie)
@@ -392,7 +392,7 @@ public class ASTReference extends SimpleNode
{
/**
* If we are in strict mode and the variable is escaped, then don't bother to
- * retreive the value since we won't use it. And if the var is not defined
+ * retreive the value since we won't use it. And if the var is not defined
* it will throw an exception. Set value to TRUE to fall through below with
* simply printing $foo, and not \$foo
*/
@@ -414,7 +414,7 @@ public class ASTReference extends SimpleNode
if (escaped)
{
localNullString = getNullString(context);
-
+
if (value == null)
{
writer.write(escPrefix);
@@ -431,7 +431,7 @@ public class ASTReference extends SimpleNode
/*
* the normal processing
- *
+ *
* if we have an event cartridge, get a new value object
*/
@@ -439,7 +439,7 @@ public class ASTReference extends SimpleNode
String toString = null;
if (value != null)
- {
+ {
if (value instanceof Renderable)
{
Renderable renderable = (Renderable)value;
@@ -469,34 +469,34 @@ public class ASTReference extends SimpleNode
}
if (value == null || toString == null)
- {
+ {
if (strictRef)
{
if (referenceType != QUIET_REFERENCE)
{
- log.error("Prepend the reference with '$!' e.g., $!{}" +
+ log.error("Prepend the reference with '$!' e.g., $!{}" +
" if you want Velocity to ignore the reference when it evaluates to null",
literal().substring(1));
if (value == null)
{
- throw new VelocityException("Reference " + literal()
- + " evaluated to null when attempting to render at "
+ throw new VelocityException("Reference " + literal()
+ + " evaluated to null when attempting to render at "
+ StringUtils.formatFileString(this));
}
else // toString == null
{
// This will probably rarely happen, but when it does we want to
// inform the user that toString == null so they don't pull there
- // hair out wondering why Velocity thinks the value is null.
+ // hair out wondering why Velocity thinks the value is null.
throw new VelocityException("Reference " + literal()
+ " evaluated to object " + value.getClass().getName()
+ " whose toString() method returned null at "
+ StringUtils.formatFileString(this));
}
- }
+ }
return true;
}
-
+
/*
* write prefix twice, because it's schmoo, so the \ don't escape each
* other...
@@ -507,7 +507,7 @@ public class ASTReference extends SimpleNode
// If in strict escape mode then we only print escape once.
// Yea, I know.. brittle stuff
writer.write(escPrefix);
- }
+ }
writer.write(escPrefix);
writer.write(morePrefix);
writer.write(localNullString);
@@ -534,19 +534,19 @@ public class ASTReference extends SimpleNode
{
writer.write(toString);
}
-
+
return true;
}
}
/**
* This method helps to implement the "render literal if null" functionality.
- *
+ *
* VelocimacroProxy saves references to macro arguments (AST nodes) so that if we have a macro
* #foobar($a $b) then there is key "$a.literal" which points to the literal presentation of the
* argument provided to variable $a. If the value of $a is null, we render the string that was
* provided as the argument.
- *
+ *
* @param context
* @return
*/
@@ -583,7 +583,7 @@ public class ASTReference extends SimpleNode
}
catch(Exception e)
{
- throw new VelocityException("Reference evaluation threw an exception at "
+ throw new VelocityException("Reference evaluation threw an exception at "
+ StringUtils.formatFileString(this), e);
}
}
@@ -597,7 +597,7 @@ public class ASTReference extends SimpleNode
return (computableReference ? execute(null, context) : null);
}
-
+
/**
* Utility class to handle nulls when printing a class type
*/
@@ -605,8 +605,8 @@ public class ASTReference extends SimpleNode
{
return clazz == null ? "null" : clazz.getName();
}
-
-
+
+
/**
* Sets the value of a complex reference (something like $foo.bar)
* Currently used by ASTSetReference()
@@ -655,11 +655,11 @@ public class ASTReference extends SimpleNode
if (strictRef)
{
String name = jjtGetChild(i+1).getFirstTokenImage();
- throw new MethodInvocationException("Attempted to access '"
+ throw new MethodInvocationException("Attempted to access '"
+ name + "' on a null value", null, name, uberInfo.getTemplateName(),
jjtGetChild(i+1).getLine(), jjtGetChild(i+1).getColumn());
- }
-
+ }
+
log.error("reference set is not a valid reference at {}",
StringUtils.formatFileString(uberInfo));
return false;
@@ -673,30 +673,30 @@ public class ASTReference extends SimpleNode
// the brackets. This means that we need to call a more general method
// of the form set(Integer, <something>), or put(Object, <something), where
// the first parameter is the index value and the second is the LHS of the set.
-
+
Object argument = astIndex.jjtGetChild(0).value(context);
// If negative, turn -1 into (size - 1)
- argument = ASTIndex.adjMinusIndexArg(argument, result, context, astIndex);
+ argument = ASTIndex.adjMinusIndexArg(argument, result, context, astIndex);
Object [] params = {argument, value};
- Class[] paramClasses = {params[0] == null ? null : params[0].getClass(),
+ Class[] paramClasses = {params[0] == null ? null : params[0].getClass(),
params[1] == null ? null : params[1].getClass()};
String methodName = "set";
- VelMethod method = ClassUtils.getMethod(methodName, params, paramClasses,
+ VelMethod method = ClassUtils.getMethod(methodName, params, paramClasses,
result, context, astIndex, false);
-
+
if (method == null)
{
// If we can't find a 'set' method, lets try 'put', This warrents a little
- // investigation performance wise... if the user is using the hash
+ // investigation performance wise... if the user is using the hash
// form $foo["blaa"], then it may be expensive to first try and fail on 'set'
// then go to 'put'? The problem is that getMethod will try the cache, then
// perform introspection on 'result' for 'set'
methodName = "put";
- method = ClassUtils.getMethod(methodName, params, paramClasses,
+ method = ClassUtils.getMethod(methodName, params, paramClasses,
result, context, astIndex, false);
- }
-
+ }
+
if (method == null)
{
// couldn't find set or put method, so bail
@@ -705,14 +705,14 @@ public class ASTReference extends SimpleNode
throw new VelocityException(
"Found neither a 'set' or 'put' method with param types '("
+ printClass(paramClasses[0]) + "," + printClass(paramClasses[1])
- + ")' on class '" + result.getClass().getName()
+ + ")' on class '" + result.getClass().getName()
+ "' at " + StringUtils.formatFileString(astIndex));
}
return false;
}
-
+
try
- {
+ {
method.invoke(result, params);
}
catch(RuntimeException e)
@@ -724,17 +724,17 @@ public class ASTReference extends SimpleNode
{
throw new MethodInvocationException(
"Exception calling method '"
- + methodName + "("
+ + methodName + "("
+ printClass(paramClasses[0]) + "," + printClass(paramClasses[1])
+ ")' in " + result.getClass(),
- e.getCause(), identifier, astIndex.getTemplateName(), astIndex.getLine(),
+ e.getCause(), identifier, astIndex.getTemplateName(), astIndex.getLine(),
astIndex.getColumn());
}
-
+
return true;
}
-
-
+
+
/*
* We support two ways of setting the value in a #set($ref.foo = $value ) :
* 1) ref.setFoo( value )
@@ -816,13 +816,13 @@ public class ASTReference extends SimpleNode
{
if (strictEscape)
{
- // If we are in strict escape mode, then we consider this type of
+ // If we are in strict escape mode, then we consider this type of
// pattern a non-reference, and we print it out as schmoo...
nullString = literal();
escaped = true;
return nullString;
}
-
+
/*
* lets do all the work here. I would argue that if this occurrs,
* it's not a reference at all, so preceeding \ characters in front
@@ -941,7 +941,7 @@ public class ASTReference extends SimpleNode
* we are working with.
*/
- // FIXME: this is the key to render nulls as literals, we need to look at context(refname+".literal")
+ // FIXME: this is the key to render nulls as literals, we need to look at context(refname+".literal")
nullString = literal();
if (t.image.startsWith("$!"))
@@ -1010,7 +1010,7 @@ public class ASTReference extends SimpleNode
* @return The evaluated value of the variable.
* @throws MethodInvocationException
*/
- public Object getVariableValue(InternalContextAdapter context, String variable)
+ public Object getVariableValue(InternalContextAdapter context, String variable)
{
Object obj = null;
try
@@ -1023,7 +1023,7 @@ public class ASTReference extends SimpleNode
variable, StringUtils.formatFileString(uberInfo));
throw e;
}
-
+
if (obj == null && strictRef)
{
if (!context.containsKey(variable))
@@ -1032,9 +1032,9 @@ public class ASTReference extends SimpleNode
variable, StringUtils.formatFileString(uberInfo));
throw new MethodInvocationException("Variable $" + variable +
" has not been set", null, identifier,
- uberInfo.getTemplateName(), uberInfo.getLine(), uberInfo.getColumn());
+ uberInfo.getTemplateName(), uberInfo.getLine(), uberInfo.getColumn());
}
}
- return obj;
+ return obj;
}
}
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTSetDirective.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTSetDirective.java
index a449ef45..b45cb8d2 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTSetDirective.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTSetDirective.java
@@ -16,7 +16,7 @@ package org.apache.velocity.runtime.parser.node;
* "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;
@@ -106,9 +106,9 @@ public class ASTSetDirective extends SimpleNode
/*
* init the tree correctly
*/
-
+
super.init( context, data );
-
+
/*
* handle '$' and '#' chars prefix
*/
@@ -126,12 +126,12 @@ public class ASTSetDirective extends SimpleNode
uberInfo = new Info(getTemplateName(),
getLine(), getColumn());
-
+
right = getRightHandSide();
left = getLeftHandSide();
-
+
strictRef = rsvc.getBoolean(RuntimeConstants.RUNTIME_REFERENCES_STRICT, false);
-
+
/*
* grab this now. No need to redo each time
*/
@@ -160,10 +160,10 @@ public class ASTSetDirective extends SimpleNode
}
isInitialized = true;
-
+
cleanupParserAndTokens();
}
-
+
return data;
}
@@ -251,11 +251,11 @@ public class ASTSetDirective extends SimpleNode
return left.setValue(context, value);
}
-
-
+
+
/**
* returns the ASTReference that is the LHS of the set statememt
- *
+ *
* @return left hand side of #set statement
*/
private ASTReference getLeftHandSide()
@@ -265,7 +265,7 @@ public class ASTSetDirective extends SimpleNode
/**
* returns the RHS Node of the set statement
- *
+ *
* @return right hand side of #set statement
*/
private Node getRightHandSide()
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTSubtractNode.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTSubtractNode.java
index 54dd958d..42906614 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTSubtractNode.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTSubtractNode.java
@@ -16,7 +16,7 @@ package org.apache.velocity.runtime.parser.node;
* "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;
@@ -64,6 +64,3 @@ public class ASTSubtractNode extends ASTMathNode
return MathUtils.subtract(left, right);
}
}
-
-
-
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTText.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTText.java
index 89353dad..27348572 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTText.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTText.java
@@ -16,7 +16,7 @@ package org.apache.velocity.runtime.parser.node;
* "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;
@@ -91,7 +91,7 @@ public class ASTText extends SimpleNode
}
builder.append(NodeUtils.tokenLiteral(t));
ctext = builder.toString();
-
+
cleanupParserAndTokens();
return data;
@@ -107,10 +107,3 @@ public class ASTText extends SimpleNode
return true;
}
}
-
-
-
-
-
-
-
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTTextblock.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTTextblock.java
index a21bee08..47f91635 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTTextblock.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTTextblock.java
@@ -16,7 +16,7 @@ package org.apache.velocity.runtime.parser.node;
* "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,17 +71,17 @@ public class ASTTextblock extends SimpleNode
throws TemplateInitException
{
Token t = getFirstToken();
-
+
String text = t.image;
-
+
// t.image is in format: #[[ <string> ]]#
// we must strip away the hash tags
text = text.substring(START.length(), text.length() - END.length());
ctext = text.toCharArray();
-
+
cleanupParserAndTokens();
-
+
return data;
}
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTTrue.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTTrue.java
index 8946233a..530861f9 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTTrue.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTTrue.java
@@ -16,7 +16,7 @@ package org.apache.velocity.runtime.parser.node;
* "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 ASTTrue extends SimpleNode
{
return value;
}
-
+
/**
* @throws TemplateInitException
* @see org.apache.velocity.runtime.parser.node.Node#init(org.apache.velocity.context.InternalContextAdapter, java.lang.Object)
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTVariable.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTVariable.java
index da0eddc8..be89bae3 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTVariable.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTVariable.java
@@ -16,7 +16,7 @@ package org.apache.velocity.runtime.parser.node;
* "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;
@@ -53,7 +53,7 @@ public class ASTVariable extends SimpleNode
{
return visitor.visit(this, data);
}
-
+
/**
* @throws TemplateInitException
* @see org.apache.velocity.runtime.parser.node.Node#init(org.apache.velocity.context.InternalContextAdapter, java.lang.Object)
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTWord.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTWord.java
index b2670ba1..14cbdc9b 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTWord.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTWord.java
@@ -16,7 +16,7 @@ package org.apache.velocity.runtime.parser.node;
* "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 ASTWord extends SimpleNode
{
return visitor.visit(this, data);
}
-
+
/**
* @throws TemplateInitException
* @see org.apache.velocity.runtime.parser.node.Node#init(org.apache.velocity.context.InternalContextAdapter, java.lang.Object)
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTprocess.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTprocess.java
index b7a844a8..f34ec8dc 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTprocess.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTprocess.java
@@ -16,7 +16,7 @@ package org.apache.velocity.runtime.parser.node;
* "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 ASTprocess extends SimpleNode
{
return visitor.visit(this, data);
}
-
+
/**
* @throws TemplateInitException
* @see org.apache.velocity.runtime.parser.node.Node#init(org.apache.velocity.context.InternalContextAdapter, java.lang.Object)
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/AbstractExecutor.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/AbstractExecutor.java
index 40df8d53..d29b6cfe 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/AbstractExecutor.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/AbstractExecutor.java
@@ -16,7 +16,7 @@ package org.apache.velocity.runtime.parser.node;
* "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.slf4j.Logger;
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 0de9ccf8..c0c9755f 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
@@ -16,7 +16,7 @@ package org.apache.velocity.runtime.parser.node;
* "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.VelocityException;
@@ -95,7 +95,7 @@ public class BooleanPropertyExecutor extends PropertyExecutor
setMethod(getIntrospector().getMethod(clazz, sb.toString(), params));
}
-
+
if (isAlive())
{
if( getMethod().getReturnType() != Boolean.TYPE &&
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 0e932248..08e8606d 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
@@ -16,7 +16,7 @@ package org.apache.velocity.runtime.parser.node;
* "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.VelocityException;
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/MapGetExecutor.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/MapGetExecutor.java
index 86245130..ec6748d3 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/MapGetExecutor.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/MapGetExecutor.java
@@ -16,7 +16,7 @@ package org.apache.velocity.runtime.parser.node;
* "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.VelocityException;
@@ -27,14 +27,14 @@ import java.util.Map;
/**
* GetExecutor that is smart about Maps. If it detects one, it does not
- * use Reflection but a cast to access the getter.
+ * use Reflection but a cast to access the getter.
*
* @author <a href="mailto:henning@apache.org">Henning P. Schmiedehausen</a>
* @version $Id$
* @since 1.5
*/
public class MapGetExecutor
- extends AbstractExecutor
+ extends AbstractExecutor
{
private final String property;
private final boolean isAlive;
@@ -101,5 +101,5 @@ public class MapGetExecutor
{
return instance;
}
- }
+ }
}
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/MapSetExecutor.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/MapSetExecutor.java
index 506dcc39..880ad572 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/MapSetExecutor.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/MapSetExecutor.java
@@ -16,7 +16,7 @@ package org.apache.velocity.runtime.parser.node;
* "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.VelocityException;
@@ -26,14 +26,14 @@ import java.util.Map;
/**
* SetExecutor that is smart about Maps. If it detects one, it does not
- * use Reflection but a cast to access the setter.
+ * use Reflection but a cast to access the setter.
*
* @author <a href="mailto:henning@apache.org">Henning P. Schmiedehausen</a>
* @version $Id$
* @since 1.5
*/
public class MapSetExecutor
- extends SetExecutor
+ extends SetExecutor
{
private final String property;
@@ -79,5 +79,5 @@ public class MapSetExecutor
public Object execute(final Object o, final Object arg)
{
return ((Map) o).put(property, arg);
- }
+ }
}
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 548da3e6..28142c45 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
@@ -16,7 +16,7 @@ package org.apache.velocity.runtime.parser.node;
* "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.math.BigDecimal;
@@ -218,7 +218,7 @@ public abstract class MathUtils
/**
* Wrap the result in the object of the bigger type.
- *
+ *
* @param value result of operation (as a long) - used to check size
* @param op1 first operand of binary operation
* @param op2 second operand of binary operation
@@ -235,7 +235,7 @@ public abstract class MathUtils
/**
* Find the common Number-type to be used in calculations.
- *
+ *
* @param op1 first operand of binary operation
* @param op2 second operand of binary operation
* @return constant indicating type of Number to use in calculations
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/PutExecutor.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/PutExecutor.java
index 4b5ca5da..5bacd8d3 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/PutExecutor.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/PutExecutor.java
@@ -16,7 +16,7 @@ package org.apache.velocity.runtime.parser.node;
* "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.VelocityException;
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/SetExecutor.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/SetExecutor.java
index 06a042bc..461c92a8 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/SetExecutor.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/SetExecutor.java
@@ -16,7 +16,7 @@ package org.apache.velocity.runtime.parser.node;
* "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.slf4j.Logger;
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/ContentResource.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/ContentResource.java
index 00b08c13..27d53238 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/ContentResource.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/ContentResource.java
@@ -16,7 +16,7 @@ package org.apache.velocity.runtime.resource;
* "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.ResourceNotFoundException;
@@ -43,7 +43,7 @@ public class ContentResource extends Resource
public ContentResource()
{
super();
-
+
setType(ResourceManager.RESOURCE_CONTENT);
}
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 c5959ec1..3f6c8437 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
@@ -16,7 +16,7 @@ package org.apache.velocity.runtime.resource;
* "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.ParseErrorException;
@@ -272,7 +272,7 @@ public abstract class Resource
{
return data;
}
-
+
/**
* Sets the type of this Resource (RESOURCE_TEMPLATE or RESOURCE_CONTENT)
* @since 1.6
@@ -281,7 +281,7 @@ public abstract class Resource
{
this.type = type;
}
-
+
/**
* @return type code of the Resource
* @since 1.6
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/ResourceCache.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/ResourceCache.java
index 03cf7eec..c55acd4e 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/ResourceCache.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/ResourceCache.java
@@ -16,7 +16,7 @@ package org.apache.velocity.runtime.resource;
* "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.RuntimeServices;
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/ResourceFactory.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/ResourceFactory.java
index c486dc0a..e95712aa 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/ResourceFactory.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/ResourceFactory.java
@@ -16,7 +16,7 @@ package org.apache.velocity.runtime.resource;
* "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;
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/ResourceManager.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/ResourceManager.java
index d0cc7bcc..99b69784 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/ResourceManager.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/ResourceManager.java
@@ -16,7 +16,7 @@ package org.apache.velocity.runtime.resource;
* "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.ParseErrorException;
@@ -79,5 +79,3 @@ public interface ResourceManager
public String getLoaderNameForResource(String resourceName );
}
-
-
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 8a44012a..4f5a5d0c 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
@@ -16,7 +16,7 @@ package org.apache.velocity.runtime.resource.loader;
* "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.ResourceNotFoundException;
@@ -170,10 +170,3 @@ public class JarHolder
return urlpath;
}
}
-
-
-
-
-
-
-
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 a624a626..41f74507 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
@@ -16,7 +16,7 @@ package org.apache.velocity.runtime.resource.loader;
* "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.ResourceNotFoundException;
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/loader/ResourceLoaderFactory.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/loader/ResourceLoaderFactory.java
index b9f56b37..09f1c73e 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/loader/ResourceLoaderFactory.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/loader/ResourceLoaderFactory.java
@@ -16,7 +16,7 @@ package org.apache.velocity.runtime.resource.loader;
* "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.VelocityException;
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 01a11ab3..ffb4d25e 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
@@ -32,7 +32,7 @@ public final class StringResource
{
/** template body */
private String body;
-
+
/** encoding */
private String encoding;
@@ -88,7 +88,7 @@ public final class StringResource
/**
* Returns the encoding of this String resource.
- *
+ *
* @return The encoding of this String resource.
*/
public String getEncoding() {
@@ -97,7 +97,7 @@ public final class StringResource
/**
* Sets the encoding of this string resource.
- *
+ *
* @param encoding The new encoding of this resource.
*/
public void setEncoding(final String encoding)
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/util/StringResourceRepository.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/util/StringResourceRepository.java
index e09e1e64..961e72a1 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/util/StringResourceRepository.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/util/StringResourceRepository.java
@@ -58,18 +58,18 @@ public interface StringResourceRepository
* @param name The string name to remove from the repository.
*/
void removeStringResource(String name);
-
+
/**
* Sets the default encoding of the repository. Encodings can also be stored per
* template string. The default implementation does this correctly.
- *
+ *
* @param encoding The encoding to use.
*/
void setEncoding(String encoding);
-
+
/**
* Returns the current encoding of this repository.
- *
+ *
* @return The current encoding of this repository.
*/
String getEncoding();
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/util/StringResourceRepositoryImpl.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/util/StringResourceRepositoryImpl.java
index cdc0e522..3d390397 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/util/StringResourceRepositoryImpl.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/util/StringResourceRepositoryImpl.java
@@ -46,7 +46,7 @@ public class StringResourceRepositoryImpl implements StringResourceRepository
* Current Repository encoding.
*/
private String encoding = RuntimeConstants.ENCODING_DEFAULT;
-
+
/**
* @see StringResourceRepository#getStringResource(java.lang.String)
*/
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/visitor/BaseVisitor.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/visitor/BaseVisitor.java
index 4941e133..c2afdfd1 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/visitor/BaseVisitor.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/visitor/BaseVisitor.java
@@ -16,7 +16,7 @@ package org.apache.velocity.runtime.visitor;
* "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;
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/visitor/NodeViewMode.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/visitor/NodeViewMode.java
index df6a716e..9300fb9e 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/visitor/NodeViewMode.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/visitor/NodeViewMode.java
@@ -16,7 +16,7 @@ package org.apache.velocity.runtime.visitor;
* "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.Token;
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/util/ArrayIterator.java b/velocity-engine-core/src/main/java/org/apache/velocity/util/ArrayIterator.java
index 1d3649ed..ab3cb5b0 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/util/ArrayIterator.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/util/ArrayIterator.java
@@ -16,7 +16,7 @@ package org.apache.velocity.util;
* "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.lang.reflect.Array;
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/util/ClassUtils.java b/velocity-engine-core/src/main/java/org/apache/velocity/util/ClassUtils.java
index 763310de..b188ba77 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/util/ClassUtils.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/util/ClassUtils.java
@@ -16,7 +16,7 @@ package org.apache.velocity.util;
* "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;
@@ -168,7 +168,7 @@ public class ClassUtils {
* @param node ASTNode, used for error reporting.
* @param strictRef If no method is found, throw an exception, never return null in this case
* @return VelMethod object if the object is found, null if not matching method is found
- */
+ */
public static VelMethod getMethod(String methodName, Object[] params,
Class[] paramClasses, Object o, InternalContextAdapter context,
SimpleNode node, boolean strictRef)
@@ -193,7 +193,7 @@ public class ClassUtils {
* get the method from the cache
*/
method = (VelMethod) icd.thingy;
- }
+ }
else
{
/*
@@ -233,14 +233,14 @@ public class ClassUtils {
+ o.getClass().getName() + "' does not contain method "
+ methodName + "(" + plist + ")", null, methodName, node
.getTemplateName(), node.getLine(), node.getColumn());
- }
+ }
else
{
return null;
}
}
- }
+ }
catch (MethodInvocationException mie)
{
/*
@@ -250,14 +250,14 @@ public class ClassUtils {
*/
throw mie;
- }
+ }
catch (RuntimeException e)
{
/**
* pass through application level runtime exceptions
*/
throw e;
- }
+ }
catch (Exception e)
{
/*
@@ -269,5 +269,5 @@ public class ClassUtils {
return method;
}
-
+
}
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/util/ContextAware.java b/velocity-engine-core/src/main/java/org/apache/velocity/util/ContextAware.java
index 2f77e7a7..a2facb3f 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/util/ContextAware.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/util/ContextAware.java
@@ -16,7 +16,7 @@ package org.apache.velocity.util;
* "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.Context;
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/util/DuckType.java b/velocity-engine-core/src/main/java/org/apache/velocity/util/DuckType.java
index 74ff315e..048c2d6f 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/util/DuckType.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/util/DuckType.java
@@ -16,7 +16,7 @@ package org.apache.velocity.util;
* "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.lang.reflect.Array;
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/util/EnumerationIterator.java b/velocity-engine-core/src/main/java/org/apache/velocity/util/EnumerationIterator.java
index 65bc5468..41a3e866 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/util/EnumerationIterator.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/util/EnumerationIterator.java
@@ -16,7 +16,7 @@ package org.apache.velocity.util;
* "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.util.Enumeration;
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/util/Pair.java b/velocity-engine-core/src/main/java/org/apache/velocity/util/Pair.java
index ec80ea4a..8d4ce92c 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/util/Pair.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/util/Pair.java
@@ -16,7 +16,7 @@ package org.apache.velocity.util;
* "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.
*/
/**
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/util/RuntimeServicesAware.java b/velocity-engine-core/src/main/java/org/apache/velocity/util/RuntimeServicesAware.java
index fe24dd0a..cff5aa70 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/util/RuntimeServicesAware.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/util/RuntimeServicesAware.java
@@ -16,7 +16,7 @@ package org.apache.velocity.util;
* "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.RuntimeServices;
@@ -24,7 +24,7 @@ import org.apache.velocity.runtime.RuntimeServices;
/**
* Use this interface to automatically
- * have the method setRuntimeServices called at initialization.
+ * have the method setRuntimeServices called at initialization.
* Applies to EventHandler and Uberspect implementations.
*
* @author <a href="mailto:wglass@wglass@forio.com">Will Glass-Husain</a>
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/util/SimplePool.java b/velocity-engine-core/src/main/java/org/apache/velocity/util/SimplePool.java
index 78fcf6f9..2fb9d34b 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/util/SimplePool.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/util/SimplePool.java
@@ -16,7 +16,7 @@ package org.apache.velocity.util;
* "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.
*/
/**
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/util/StringBuilderWriter.java b/velocity-engine-core/src/main/java/org/apache/velocity/util/StringBuilderWriter.java
index 8a43649b..5daf927f 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/util/StringBuilderWriter.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/util/StringBuilderWriter.java
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -56,7 +56,7 @@ public class StringBuilderWriter extends Writer implements Serializable {
/**
* Constructs a new instance with the specified {@link StringBuilder}.
- *
+ *
* <p>If {@code builder} is null a new instance with default capacity will be created.</p>
*
* @param builder The String builder. May be null.
@@ -104,7 +104,7 @@ public class StringBuilderWriter extends Writer implements Serializable {
}
/**
- * Closing this writer has no effect.
+ * Closing this writer has no effect.
*/
@Override
public void close() {
@@ -112,7 +112,7 @@ public class StringBuilderWriter extends Writer implements Serializable {
}
/**
- * Flushing this writer has no effect.
+ * Flushing this writer has no effect.
*/
@Override
public void flush() {
@@ -122,7 +122,7 @@ public class StringBuilderWriter extends Writer implements Serializable {
/**
* Writes a String to the {@link StringBuilder}.
- *
+ *
* @param value The value to write
*/
@Override
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/util/StringUtils.java b/velocity-engine-core/src/main/java/org/apache/velocity/util/StringUtils.java
index 74fdbbda..4a70f085 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/util/StringUtils.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/util/StringUtils.java
@@ -16,7 +16,7 @@ package org.apache.velocity.util;
* "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.directive.Directive;
@@ -157,37 +157,37 @@ public class StringUtils
/**
* Creates a string that formats the template filename with line number
- * and column of the given Directive. We use this routine to provide a cosistent format for displaying
+ * and column of the given Directive. We use this routine to provide a cosistent format for displaying
* file errors.
*/
public static final String formatFileString(Directive directive)
{
- return formatFileString(directive.getTemplateName(), directive.getLine(), directive.getColumn());
+ return formatFileString(directive.getTemplateName(), directive.getLine(), directive.getColumn());
}
/**
* Creates a string that formats the template filename with line number
- * and column of the given Node. We use this routine to provide a cosistent format for displaying
+ * and column of the given Node. We use this routine to provide a cosistent format for displaying
* file errors.
*/
public static final String formatFileString(Node node)
{
- return formatFileString(node.getTemplateName(), node.getLine(), node.getColumn());
+ return formatFileString(node.getTemplateName(), node.getLine(), node.getColumn());
}
-
+
/**
* Simply creates a string that formats the template filename with line number
- * and column. We use this routine to provide a cosistent format for displaying
+ * and column. We use this routine to provide a cosistent format for displaying
* file errors.
*/
public static final String formatFileString(Info info)
{
return formatFileString(info.getTemplateName(), info.getLine(), info.getColumn());
}
-
+
/**
* Simply creates a string that formats the template filename with line number
- * and column. We use this routine to provide a cosistent format for displaying
+ * and column. We use this routine to provide a cosistent format for displaying
* file errors.
* @param template File name of template, can be null
* @param linenum Line number within the file
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/util/TemplateBoolean.java b/velocity-engine-core/src/main/java/org/apache/velocity/util/TemplateBoolean.java
index e6f81062..7da890b3 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/util/TemplateBoolean.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/util/TemplateBoolean.java
@@ -16,7 +16,7 @@ package org.apache.velocity.util;
* "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.
*/
/**
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/util/TemplateNumber.java b/velocity-engine-core/src/main/java/org/apache/velocity/util/TemplateNumber.java
index 8a8b0deb..43829424 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/util/TemplateNumber.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/util/TemplateNumber.java
@@ -16,7 +16,7 @@ package org.apache.velocity.util;
* "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.
*/
/**
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/util/TemplateString.java b/velocity-engine-core/src/main/java/org/apache/velocity/util/TemplateString.java
index a44bec30..781b05d2 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/util/TemplateString.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/util/TemplateString.java
@@ -16,7 +16,7 @@ package org.apache.velocity.util;
* "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.
*/
/**
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/AbstractChainableUberspector.java b/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/AbstractChainableUberspector.java
index f3015d97..0ab31f09 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/AbstractChainableUberspector.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/AbstractChainableUberspector.java
@@ -24,7 +24,7 @@ import java.util.Iterator;
/**
* Default implementation of a {@link ChainableUberspector chainable uberspector} that forwards all calls to the wrapped
* uberspector (when that is possible). It should be used as the base class for all chainable uberspectors.
- *
+ *
* @version $Id: $
* @since 1.6
* @see ChainableUberspector
@@ -36,7 +36,7 @@ public abstract class AbstractChainableUberspector extends UberspectImpl impleme
/**
* {@inheritDoc}
- *
+ *
* @see ChainableUberspector#wrap(org.apache.velocity.util.introspection.Uberspect)
* @see #inner
*/
@@ -47,7 +47,7 @@ public abstract class AbstractChainableUberspector extends UberspectImpl impleme
/**
* init - the chainable uberspector is responsible for the initialization of the wrapped uberspector
- *
+ *
* @see org.apache.velocity.util.introspection.Uberspect#init()
*/
//@Override
@@ -65,7 +65,7 @@ public abstract class AbstractChainableUberspector extends UberspectImpl impleme
/**
* {@inheritDoc}
- *
+ *
* @see org.apache.velocity.util.introspection.Uberspect#getIterator(java.lang.Object,
* org.apache.velocity.util.introspection.Info)
*/
@@ -78,7 +78,7 @@ public abstract class AbstractChainableUberspector extends UberspectImpl impleme
/**
* {@inheritDoc}
- *
+ *
* @see org.apache.velocity.util.introspection.Uberspect#getMethod(java.lang.Object, java.lang.String,
* java.lang.Object[], org.apache.velocity.util.introspection.Info)
*/
@@ -90,7 +90,7 @@ public abstract class AbstractChainableUberspector extends UberspectImpl impleme
/**
* {@inheritDoc}
- *
+ *
* @see org.apache.velocity.util.introspection.Uberspect#getPropertyGet(java.lang.Object, java.lang.String,
* org.apache.velocity.util.introspection.Info)
*/
@@ -102,7 +102,7 @@ public abstract class AbstractChainableUberspector extends UberspectImpl impleme
/**
* {@inheritDoc}
- *
+ *
* @see org.apache.velocity.util.introspection.Uberspect#getPropertySet(java.lang.Object, java.lang.String,
* java.lang.Object, org.apache.velocity.util.introspection.Info)
*/
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/ChainableUberspector.java b/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/ChainableUberspector.java
index 8d05d8fa..135f9a6e 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/ChainableUberspector.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/ChainableUberspector.java
@@ -22,7 +22,7 @@ package org.apache.velocity.util.introspection;
/**
* Interface that marks uberspectors as chainable, meaning that multiple uberspectors can be
* combined in a chain (using the Decorator pattern).
- *
+ *
* @version $Id: $
* @since 1.6
*/
@@ -30,7 +30,7 @@ public interface ChainableUberspector extends Uberspect
{
/**
* Specify the decorated Uberspector
- *
+ *
* @param inner The decorated uberspector.
*/
public void wrap(Uberspect inner);
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/ConversionHandlerImpl.java b/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/ConversionHandlerImpl.java
index 38de6a57..51666813 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/ConversionHandlerImpl.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/ConversionHandlerImpl.java
@@ -286,7 +286,7 @@ public class ConversionHandlerImpl implements ConversionHandler
};
standardConverterMap.put(new Pair<>(Integer.class, String.class), stringToInteger);
standardConverterMap.put(new Pair<>(Integer.TYPE, String.class), stringToInteger);
-
+
/* narrowing towards long */
Converter<Long> narrowingToLong = new Converter<Long>()
{
@@ -337,7 +337,7 @@ public class ConversionHandlerImpl implements ConversionHandler
};
standardConverterMap.put(new Pair<>(Long.class, String.class), stringToLong);
standardConverterMap.put(new Pair<>(Long.TYPE, String.class), stringToLong);
-
+
/* narrowing towards float */
Converter<Float> narrowingToFloat = new Converter<Float>()
{
@@ -467,7 +467,7 @@ public class ConversionHandlerImpl implements ConversionHandler
standardConverterMap.put(new Pair<>(Long.class, Boolean.TYPE), booleanToLong);
standardConverterMap.put(new Pair<>(Long.TYPE, Boolean.class), booleanToLong);
standardConverterMap.put(new Pair<>(Long.TYPE, Boolean.TYPE), booleanToLong);
-
+
/* to string */
toString = new Converter<String>()
{
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/Converter.java b/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/Converter.java
index f84b4e60..fcb2b187 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/Converter.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/Converter.java
@@ -16,7 +16,7 @@ package org.apache.velocity.util.introspection;
* "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.
*/
/**
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/DeprecatedCheckUberspector.java b/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/DeprecatedCheckUberspector.java
index e93ab66d..7a1d4349 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/DeprecatedCheckUberspector.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/DeprecatedCheckUberspector.java
@@ -16,7 +16,7 @@ package org.apache.velocity.util.introspection;
* "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.lang.reflect.Method;
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/Info.java b/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/Info.java
index a2370dfe..fbf02f4b 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/Info.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/Info.java
@@ -16,7 +16,7 @@ package org.apache.velocity.util.introspection;
* "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.node.Node;
@@ -51,14 +51,14 @@ public class Info
{
this(node.getTemplateName(), node.getLine(), node.getColumn());
}
-
+
/**
* Force callers to set the location information.
*/
private Info()
{
}
-
+
/**
* @return The template name.
*/
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/IntrospectionCacheData.java b/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/IntrospectionCacheData.java
index ec17f487..0638f19c 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/IntrospectionCacheData.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/IntrospectionCacheData.java
@@ -16,7 +16,7 @@ package org.apache.velocity.util.introspection;
* "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.
*/
/**
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/IntrospectionUtils.java b/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/IntrospectionUtils.java
index 3a2eb236..9b28a042 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/IntrospectionUtils.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/IntrospectionUtils.java
@@ -16,7 +16,7 @@ package org.apache.velocity.util.introspection;
* "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.util.HashMap;
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/Introspector.java b/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/Introspector.java
index 4082a4b3..3634d709 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/Introspector.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/Introspector.java
@@ -16,7 +16,7 @@ package org.apache.velocity.util.introspection;
* "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.slf4j.Logger;
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/IntrospectorBase.java b/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/IntrospectorBase.java
index f2d8dee6..827f076e 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/IntrospectorBase.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/IntrospectorBase.java
@@ -16,7 +16,7 @@ package org.apache.velocity.util.introspection;
* "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.slf4j.Logger;
@@ -73,7 +73,7 @@ public abstract class IntrospectorBase
introspectorCache = new IntrospectorCache(log, conversionHandler);
this.conversionHandler = conversionHandler;
}
-
+
/**
* Gets the method defined by <code>name</code> and
* <code>params</code> for the Class <code>c</code>.
@@ -94,7 +94,7 @@ public abstract class IntrospectorBase
{
throw new IllegalArgumentException ("class object is null!");
}
-
+
if (params == null)
{
throw new IllegalArgumentException("params object is null!");
@@ -142,7 +142,7 @@ public abstract class IntrospectorBase
/**
* Return the internal IntrospectorCache object.
- *
+ *
* @return The internal IntrospectorCache object.
* @since 1.5
*/
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/IntrospectorCache.java b/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/IntrospectorCache.java
index 3b9e4dbe..c46165c3 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/IntrospectorCache.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/IntrospectorCache.java
@@ -16,7 +16,7 @@ package org.apache.velocity.util.introspection;
* "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.commons.lang3.Conversion;
@@ -60,7 +60,7 @@ public final class IntrospectorCache
* Keep the names of the classes in another map. This is needed for a multi-classloader environment where it is possible
* to have Class 'Foo' loaded by a classloader and then get asked to introspect on 'Foo' from another class loader. While these
* two Class objects have the same name, a <code>classMethodMaps.get(Foo.class)</code> will return null. For that case, we
- * keep a set of class names to recognize this case.
+ * keep a set of class names to recognize this case.
*/
private final Set classNameCache = new HashSet();
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/LinkingUberspector.java b/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/LinkingUberspector.java
index 4152d469..7a54e2c2 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/LinkingUberspector.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/LinkingUberspector.java
@@ -16,7 +16,7 @@ package org.apache.velocity.util.introspection;
* "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.util.Iterator;
@@ -29,7 +29,7 @@ import java.util.Iterator;
* then this utility class is used to provide a basic default chaining where the
* first non-null result is kept for each introspection call.
* </p>
- *
+ *
* @since 1.6
* @see ChainableUberspector
* @version $Id: LinkingUberspector.java 10959 2008-07-01 00:12:29Z sdumitriu $
@@ -52,7 +52,7 @@ public class LinkingUberspector extends AbstractChainableUberspector
* <p>
* Init both wrapped uberspectors
* </p>
- *
+ *
* @see org.apache.velocity.util.introspection.Uberspect#init()
*/
//@Override
@@ -64,7 +64,7 @@ public class LinkingUberspector extends AbstractChainableUberspector
/**
* {@inheritDoc}
- *
+ *
* @see org.apache.velocity.util.introspection.Uberspect#getIterator(java.lang.Object,
* org.apache.velocity.util.introspection.Info)
*/
@@ -78,7 +78,7 @@ public class LinkingUberspector extends AbstractChainableUberspector
/**
* {@inheritDoc}
- *
+ *
* @see org.apache.velocity.util.introspection.Uberspect#getMethod(java.lang.Object, java.lang.String,
* java.lang.Object[], org.apache.velocity.util.introspection.Info)
*/
@@ -91,7 +91,7 @@ public class LinkingUberspector extends AbstractChainableUberspector
/**
* {@inheritDoc}
- *
+ *
* @see org.apache.velocity.util.introspection.Uberspect#getPropertyGet(java.lang.Object, java.lang.String,
* org.apache.velocity.util.introspection.Info)
*/
@@ -104,7 +104,7 @@ public class LinkingUberspector extends AbstractChainableUberspector
/**
* {@inheritDoc}
- *
+ *
* @see org.apache.velocity.util.introspection.Uberspect#getPropertySet(java.lang.Object, java.lang.String,
* java.lang.Object, org.apache.velocity.util.introspection.Info)
*/
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/MethodMap.java b/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/MethodMap.java
index 693ca671..ddd013f8 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/MethodMap.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/MethodMap.java
@@ -16,7 +16,7 @@ package org.apache.velocity.util.introspection;
* "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.lang.reflect.Method;
@@ -286,7 +286,7 @@ public class MethodMap
}
}
}
-
+
if (equivalentMatches != null)
{
System.out.println("ambiguous: "+equivalentMatches);
@@ -409,7 +409,7 @@ public class MethodMap
/**
* Returns true if the supplied method is applicable to actual
* argument types.
- *
+ *
* @param method method that will be called
* @param classes arguments to method
* @return true if method is applicable to arguments
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/SecureIntrospectorControl.java b/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/SecureIntrospectorControl.java
index 393502c2..6f467871 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/SecureIntrospectorControl.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/SecureIntrospectorControl.java
@@ -16,7 +16,7 @@ package org.apache.velocity.util.introspection;
* "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.
*/
/**
@@ -30,8 +30,8 @@ public interface SecureIntrospectorControl
{
/**
- * Determine which methods and classes to prevent from executing.
- *
+ * Determine which methods and classes to prevent from executing.
+ *
* @param clazz Class for which method is being called
* @param method method being called. This may be null in the case of a call to iterator, get, or set method
*
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/SecureUberspector.java b/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/SecureUberspector.java
index 06bedb7e..1ea104e5 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/SecureUberspector.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/SecureUberspector.java
@@ -16,7 +16,7 @@ package org.apache.velocity.util.introspection;
* "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.RuntimeConstants;
@@ -26,16 +26,16 @@ import org.apache.velocity.util.RuntimeServicesAware;
import java.util.Iterator;
/**
- * Use a custom introspector that prevents classloader related method
- * calls. Use this introspector for situations in which template
- * writers are numerous or untrusted. Specifically, this introspector
+ * Use a custom introspector that prevents classloader related method
+ * calls. Use this introspector for situations in which template
+ * writers are numerous or untrusted. Specifically, this introspector
* prevents creation of arbitrary objects or reflection on objects.
- *
+ *
* <p>To use this introspector, set the following property:
* <pre>
* runtime.introspector.uberspect = org.apache.velocity.util.introspection.SecureUberspector
* </pre>
- *
+ *
* @author <a href="mailto:wglass@forio.com">Will Glass-Husain</a>
* @version $Id$
* @since 1.5
@@ -54,14 +54,14 @@ public class SecureUberspector extends UberspectImpl
String [] badClasses = rsvc.getConfiguration()
.getStringArray(RuntimeConstants.INTROSPECTOR_RESTRICT_CLASSES);
-
+
introspector = new SecureIntrospectorImpl(badClasses, badPackages, log);
}
-
+
/**
* Get an iterator from the given object. Since the superclass method
* this secure version checks for execute permission.
- *
+ *
* @param obj object to iterate over
* @param i line, column, template info
* @return Iterator for object
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/Uberspect.java b/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/Uberspect.java
index 877a8c7e..77f9f54b 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/Uberspect.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/Uberspect.java
@@ -16,7 +16,7 @@ package org.apache.velocity.util.introspection;
* "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.util.Iterator;
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/UberspectImpl.java b/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/UberspectImpl.java
index 8edea3f3..14e6a5e6 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/UberspectImpl.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/UberspectImpl.java
@@ -16,7 +16,7 @@ package org.apache.velocity.util.introspection;
* "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.VelocityException;
@@ -216,14 +216,14 @@ public class UberspectImpl implements Uberspect, RuntimeServicesAware
try
{
return (Iterator)iter.invoke(obj);
- }
+ }
catch (IllegalAccessException e)
{
// Cannot invoke this method, just give up
}
catch (Exception e)
{
- throw new VelocityException("Error invoking the method 'iterator' on class '"
+ throw new VelocityException("Error invoking the method 'iterator' on class '"
+ obj.getClass().getName() +"'", e);
}
}
@@ -343,7 +343,7 @@ public class UberspectImpl implements Uberspect, RuntimeServicesAware
/*
* Let's see if we are a map...
*/
- if (!executor.isAlive())
+ if (!executor.isAlive())
{
executor = new MapGetExecutor(log, obj, identifier);
}
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/VelMethod.java b/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/VelMethod.java
index 9cf9eae3..5bf36149 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/VelMethod.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/VelMethod.java
@@ -16,7 +16,7 @@ package org.apache.velocity.util.introspection;
* "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.lang.reflect.InvocationTargetException;
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/VelPropertyGet.java b/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/VelPropertyGet.java
index 36873d56..c91832ec 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/VelPropertyGet.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/VelPropertyGet.java
@@ -16,7 +16,7 @@ package org.apache.velocity.util.introspection;
* "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.
*/
/**
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/VelPropertySet.java b/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/VelPropertySet.java
index eb401c42..75811b61 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/VelPropertySet.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/VelPropertySet.java
@@ -16,7 +16,7 @@ package org.apache.velocity.util.introspection;
* "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.
*/
/**
diff --git a/velocity-engine-core/src/main/parser/Parser.jjt b/velocity-engine-core/src/main/parser/Parser.jjt
index 6746c18a..b55469e6 100644
--- a/velocity-engine-core/src/main/parser/Parser.jjt
+++ b/velocity-engine-core/src/main/parser/Parser.jjt
@@ -1680,8 +1680,8 @@ boolean Directive() :
/*
* and the following block if the PD needs it
*/
- (((
- LOOKAHEAD( { getToken(1).kind != END && ( !newlineBeforeStatement || getToken(1).kind != WHITESPACE || getToken(2).kind != END ) }) newlineBeforeStatement = Statement(newlineBeforeStatement))*
+ (((
+ LOOKAHEAD( { getToken(1).kind != END && ( !newlineBeforeStatement || getToken(1).kind != WHITESPACE || getToken(2).kind != END ) }) newlineBeforeStatement = Statement(newlineBeforeStatement))*
{
block = jjtThis;
block.setPrefix(blockPrefix);
@@ -1927,9 +1927,9 @@ boolean IfStatement() :
]
( LOOKAHEAD(
{
- (getToken(1).kind != ELSEIF && getToken(1).kind != ELSE && getToken(1).kind != END) &&
+ (getToken(1).kind != ELSEIF && getToken(1).kind != ELSE && getToken(1).kind != END) &&
(!afterNewline || getToken(1).kind != WHITESPACE || (getToken(2).kind != ELSEIF && getToken(2).kind != ELSE && getToken(2).kind != END))
- })
+ })
afterNewline = Statement(afterNewline) )*
{
lastBlock = jjtThis;
@@ -2295,4 +2295,3 @@ void PrimaryExpression() #void : {}
------
*/
-
diff --git a/velocity-engine-core/src/main/resources/org/apache/velocity/runtime/defaults/directive.properties b/velocity-engine-core/src/main/resources/org/apache/velocity/runtime/defaults/directive.properties
index 11451353..1f9a972d 100644
--- a/velocity-engine-core/src/main/resources/org/apache/velocity/runtime/defaults/directive.properties
+++ b/velocity-engine-core/src/main/resources/org/apache/velocity/runtime/defaults/directive.properties
@@ -13,7 +13,7 @@
# "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.
directive.1=org.apache.velocity.runtime.directive.Foreach
directive.2=org.apache.velocity.runtime.directive.Include
directive.3=org.apache.velocity.runtime.directive.Parse
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/ArithmeticTestCase.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/ArithmeticTestCase.java
index 1eb1f627..43a3b677 100644
--- a/velocity-engine-core/src/test/java/org/apache/velocity/test/ArithmeticTestCase.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/ArithmeticTestCase.java
@@ -16,7 +16,7 @@ package org.apache.velocity.test;
* "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 junit.framework.Test;
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/ArrayMethodsTestCase.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/ArrayMethodsTestCase.java
index e7aaf29e..877b2e77 100644
--- a/velocity-engine-core/src/test/java/org/apache/velocity/test/ArrayMethodsTestCase.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/ArrayMethodsTestCase.java
@@ -16,7 +16,7 @@ package org.apache.velocity.test;
* "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.lang.reflect.Array;
@@ -205,5 +205,3 @@ public class ArrayMethodsTestCase extends BaseTestCase
}
}
-
-
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/BlockMacroTestCase.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/BlockMacroTestCase.java
index 5f024f7d..8eb3f7b5 100644
--- a/velocity-engine-core/src/test/java/org/apache/velocity/test/BlockMacroTestCase.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/BlockMacroTestCase.java
@@ -16,7 +16,7 @@ package org.apache.velocity.test;
* "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.RuntimeConstants;
@@ -35,7 +35,7 @@ public class BlockMacroTestCase extends BaseTestCase
{
String template = "#macro(foo $txt) Yeah, $txt! $bodyContent $bodyContent#end #@foo(\"woohoo\")jee#end";
String result = " Yeah, woohoo! jee jee";
-
+
assertEvalEquals(result, template);
}
@@ -43,7 +43,7 @@ public class BlockMacroTestCase extends BaseTestCase
{
String template = "#macro(foo $txt) Yeah, $txt! $bodyContent#end #@foo(\"woohoo\")#foreach($i in [1..3])$i:#{end}#end";
String result = " Yeah, woohoo! 1:2:3:";
-
+
assertEvalEquals(result, template);
}
@@ -51,7 +51,7 @@ public class BlockMacroTestCase extends BaseTestCase
{
String template = "#macro(foo $txt) Yeah, $txt! $bodyContent#end #@foo(\"woohoo\")#end";
String result = " Yeah, woohoo! ";
-
+
assertEvalEquals(result, template);
}
@@ -59,7 +59,7 @@ public class BlockMacroTestCase extends BaseTestCase
{
String template = "#macro(foo) Yeah! $bodyContent#end #@foo()#end";
String result = " Yeah! ";
-
+
assertEvalEquals(result, template);
}
@@ -68,7 +68,7 @@ public class BlockMacroTestCase extends BaseTestCase
engine.setProperty(RuntimeConstants.VM_BODY_REFERENCE, "myBody");
String template = "#macro(foo) Yeah! $myBody#end #@foo()#end";
String result = " Yeah! ";
-
+
assertEvalEquals(result, template);
}
@@ -86,7 +86,7 @@ public class BlockMacroTestCase extends BaseTestCase
assertEvalException("#@foo#end");
assertEvalException("#@foo()#end");
}
-
+
public void testVelocity690()
{
assertEvalEquals(" output ", "#macro(foo) output #end#@foo #end");
@@ -94,12 +94,12 @@ public class BlockMacroTestCase extends BaseTestCase
assertEvalEquals("#[output)", "#macro(foo2)#[$bodyContent)#end#{@foo2}output#end");
assertEvalException("#macro(foo) output #end#@foo");
}
-
+
public void testVelocity675() throws Exception
{
- assertEvalEquals("#@foo#end", "#@foo#end");
+ assertEvalEquals("#@foo#end", "#@foo#end");
}
-
+
public void testVelocity685() throws Exception
{
engine.setProperty(RuntimeConstants.VM_ARGUMENTS_STRICT, Boolean.TRUE);
@@ -139,4 +139,3 @@ public class BlockMacroTestCase extends BaseTestCase
assertTmplEquals("cbabc", "a");
}
}
-
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/BreakDirectiveTestCase.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/BreakDirectiveTestCase.java
index 45c71368..206875b3 100644
--- a/velocity-engine-core/src/test/java/org/apache/velocity/test/BreakDirectiveTestCase.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/BreakDirectiveTestCase.java
@@ -16,7 +16,7 @@ package org.apache.velocity.test;
* "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.VelocityEngine;
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/BuiltInEventHandlerTestCase.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/BuiltInEventHandlerTestCase.java
index 2c89955d..602022a3 100644
--- a/velocity-engine-core/src/test/java/org/apache/velocity/test/BuiltInEventHandlerTestCase.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/BuiltInEventHandlerTestCase.java
@@ -296,10 +296,10 @@ public class BuiltInEventHandlerTestCase extends BaseTestCase {
assertEquals("Jimmy\\'s",writer.toString());
**/
-
+
log("Escape selected references (global configuration)");
-
+
}
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/CommentsTestCase.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/CommentsTestCase.java
index bf7f3613..39724a64 100644
--- a/velocity-engine-core/src/test/java/org/apache/velocity/test/CommentsTestCase.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/CommentsTestCase.java
@@ -16,7 +16,7 @@ package org.apache.velocity.test;
* "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 junit.framework.Test;
@@ -29,7 +29,7 @@ import java.io.StringWriter;
/**
* Test comments
- *
+ *
* @author <a href="mailto:wglass@forio.com">Will Glass-Husain</a>
* @version $Id$
*/
@@ -40,7 +40,7 @@ public class CommentsTestCase extends BaseTestCase
{
return new TestSuite(CommentsTestCase.class);
}
-
+
/**
* Default constructor.
* @param name
@@ -50,7 +50,7 @@ public class CommentsTestCase extends BaseTestCase
super(name);
}
-
+
/**
* Test multiline comments
* @throws Exception
@@ -60,8 +60,8 @@ public class CommentsTestCase extends BaseTestCase
{
VelocityEngine ve = new VelocityEngine();
ve.init();
-
- Context context = new VelocityContext();
+
+ Context context = new VelocityContext();
StringWriter writer = new StringWriter();
ve.evaluate(context, writer, "test","abc #* test\r\ntest2*#\r\ndef");
assertEquals("abc \r\ndef", writer.toString());
@@ -76,17 +76,17 @@ public class CommentsTestCase extends BaseTestCase
{
VelocityEngine ve = new VelocityEngine();
ve.init();
-
- Context context = new VelocityContext();
+
+ Context context = new VelocityContext();
StringWriter writer = new StringWriter();
ve.evaluate(context, writer, "test","123 ## test test\r\nabc");
- assertEquals("123 abc", writer.toString());
-
- context = new VelocityContext();
+ assertEquals("123 abc", writer.toString());
+
+ context = new VelocityContext();
writer = new StringWriter();
ve.evaluate(context, writer, "test","123 \r\n## test test\r\nabc");
- assertEquals("123 \r\nabc", writer.toString());
-
+ assertEquals("123 \r\nabc", writer.toString());
+
}
/**
@@ -98,11 +98,11 @@ public class CommentsTestCase extends BaseTestCase
{
VelocityEngine ve = new VelocityEngine();
ve.init();
-
- Context context = new VelocityContext();
+
+ Context context = new VelocityContext();
StringWriter writer = new StringWriter();
ve.evaluate(context, writer, "test","test\r\n## #* *# ${user \r\nabc");
- assertEquals("test\r\nabc", writer.toString());
-
+ assertEquals("test\r\nabc", writer.toString());
+
}
}
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/CommonsExtPropTestCase.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/CommonsExtPropTestCase.java
index d0e799c2..31319e29 100644
--- a/velocity-engine-core/src/test/java/org/apache/velocity/test/CommonsExtPropTestCase.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/CommonsExtPropTestCase.java
@@ -16,7 +16,7 @@ package org.apache.velocity.test;
* "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 junit.framework.TestSuite;
@@ -176,11 +176,3 @@ public class CommonsExtPropTestCase extends BaseTestCase
result.write("\n");
}
}
-
-
-
-
-
-
-
-
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/ContextAutoreferenceKeyTestCase.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/ContextAutoreferenceKeyTestCase.java
index 9a71211d..3697a292 100644
--- a/velocity-engine-core/src/test/java/org/apache/velocity/test/ContextAutoreferenceKeyTestCase.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/ContextAutoreferenceKeyTestCase.java
@@ -16,7 +16,7 @@ package org.apache.velocity.test;
* "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.VelocityContext;
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/DefineTestCase.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/DefineTestCase.java
index de76f21c..1c66ced8 100755
--- a/velocity-engine-core/src/test/java/org/apache/velocity/test/DefineTestCase.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/DefineTestCase.java
@@ -16,7 +16,7 @@ package org.apache.velocity.test;
* "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.
*/
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/EvaluateTestCase.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/EvaluateTestCase.java
index 7bd9cf04..b1968b35 100644
--- a/velocity-engine-core/src/test/java/org/apache/velocity/test/EvaluateTestCase.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/EvaluateTestCase.java
@@ -16,7 +16,7 @@ package org.apache.velocity.test;
* "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;
@@ -38,13 +38,13 @@ import java.util.Map;
/**
* Test #evaluate directive.
- *
+ *
* @author <a href="mailto:wglass@forio.com">Will Glass-Husain</a>
* @version $Id$
*/
public class EvaluateTestCase extends BaseTestCase
{
-
+
/**
* VTL file extension.
*/
@@ -142,7 +142,7 @@ public class EvaluateTestCase extends BaseTestCase
/**
* Test that the event handlers work in #evaluate (since they are
- * attached to the context). Only need to check one - they all
+ * attached to the context). Only need to check one - they all
* work the same.
* @throws Exception
*/
@@ -152,17 +152,17 @@ public class EvaluateTestCase extends BaseTestCase
VelocityEngine ve = new VelocityEngine();
ve.setProperty(RuntimeConstants.EVENTHANDLER_REFERENCEINSERTION, EscapeHtmlReference.class.getName());
ve.init();
-
+
Context context = new VelocityContext();
context.put("lt","<");
context.put("gt",">");
StringWriter writer = new StringWriter();
ve.evaluate(context, writer, "test","${lt}test${gt} #evaluate('${lt}test2${gt}')");
assertEquals("&lt;test&gt; &lt;test2&gt;", writer.toString());
-
+
}
-
-
+
+
/**
* Test errors are thrown
* @throws Exception
@@ -172,12 +172,12 @@ public class EvaluateTestCase extends BaseTestCase
{
VelocityEngine ve = new VelocityEngine();
ve.init();
-
+
Context context = new VelocityContext();
-
+
// no arguments
StringWriter writer = new StringWriter();
- try
+ try
{
ve.evaluate(context, writer, "test",
"#evaluate()");
@@ -189,10 +189,10 @@ public class EvaluateTestCase extends BaseTestCase
assertEquals(1,e.getLineNumber());
assertEquals(1,e.getColumnNumber());
}
-
+
// too many arguments
writer = new StringWriter();
- try
+ try
{
ve.evaluate(context, writer, "test",
"#evaluate('aaa' 'bbb')");
@@ -204,10 +204,10 @@ public class EvaluateTestCase extends BaseTestCase
assertEquals(1,e.getLineNumber());
assertEquals(17,e.getColumnNumber());
}
-
+
// argument not a string or reference
writer = new StringWriter();
- try
+ try
{
ve.evaluate(context, writer, "test",
"#evaluate(10)");
@@ -219,10 +219,10 @@ public class EvaluateTestCase extends BaseTestCase
assertEquals(1,e.getLineNumber());
assertEquals(11,e.getColumnNumber());
}
-
+
// checking line/col for parse error
writer = new StringWriter();
- try
+ try
{
String eval = "this is a multiline\n\n\n\n\n test #foreach() with an error";
context.put("eval",eval);
@@ -236,9 +236,9 @@ public class EvaluateTestCase extends BaseTestCase
assertEquals("test",e.getTemplateName());
assertEquals(2,e.getLineNumber());
assertEquals(15,e.getColumnNumber());
- }
+ }
}
-
+
/**
* Test a file parses with no errors and compare to existing file.
* @param basefilename
@@ -250,7 +250,7 @@ public class EvaluateTestCase extends BaseTestCase
info("Test file: "+basefilename);
VelocityEngine ve = engine;
ve.addProperty(RuntimeConstants.FILE_RESOURCE_LOADER_PATH, FILE_RESOURCE_LOADER_PATH);
-
+
for (Iterator i = properties.keySet().iterator(); i.hasNext();)
{
String key = (String) i.next();
@@ -258,24 +258,24 @@ public class EvaluateTestCase extends BaseTestCase
ve.addProperty(key, value);
info("Add property: "+key+" = "+value);
}
-
+
ve.init();
-
+
Template template;
FileOutputStream fos;
Writer fwriter;
-
+
template = ve.getTemplate( getFileName(null, basefilename, TMPL_FILE_EXT) );
-
+
fos = new FileOutputStream (
getFileName(RESULTS_DIR, basefilename, RESULT_FILE_EXT));
-
+
fwriter = new BufferedWriter( new OutputStreamWriter(fos) );
-
+
template.merge(context, fwriter);
fwriter.flush();
fwriter.close();
-
+
if (!isMatch(RESULTS_DIR, COMPARE_DIR, basefilename, RESULT_FILE_EXT, CMP_FILE_EXT))
{
String result = getFileContents(RESULTS_DIR, basefilename, RESULT_FILE_EXT);
@@ -285,7 +285,7 @@ public class EvaluateTestCase extends BaseTestCase
"-----Result-----\n"+ result +
"----Expected----\n"+ compare +
"----------------";
-
+
fail(msg);
}
}
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/EventHandlingTestCase.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/EventHandlingTestCase.java
index d84cfdba..a0ba2704 100644
--- a/velocity-engine-core/src/test/java/org/apache/velocity/test/EventHandlingTestCase.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/EventHandlingTestCase.java
@@ -16,7 +16,7 @@ package org.apache.velocity.test;
* "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.VelocityContext;
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/ExceptionTestCase.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/ExceptionTestCase.java
index bb1cdebb..7e0a731c 100644
--- a/velocity-engine-core/src/test/java/org/apache/velocity/test/ExceptionTestCase.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/ExceptionTestCase.java
@@ -16,7 +16,7 @@ package org.apache.velocity.test;
* "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 junit.framework.Test;
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/ExpressionAsMethodArgumentTestCase.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/ExpressionAsMethodArgumentTestCase.java
index 0d660e8b..44ef1fd5 100644
--- a/velocity-engine-core/src/test/java/org/apache/velocity/test/ExpressionAsMethodArgumentTestCase.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/ExpressionAsMethodArgumentTestCase.java
@@ -16,7 +16,7 @@ package org.apache.velocity.test;
* "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.VelocityContext;
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/FilteredEventHandlingTestCase.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/FilteredEventHandlingTestCase.java
index d40498bd..82995217 100644
--- a/velocity-engine-core/src/test/java/org/apache/velocity/test/FilteredEventHandlingTestCase.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/FilteredEventHandlingTestCase.java
@@ -16,7 +16,7 @@ package org.apache.velocity.test;
* "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 junit.framework.Test;
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/ForeachTestCase.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/ForeachTestCase.java
index e3e74890..c1398cfb 100644
--- a/velocity-engine-core/src/test/java/org/apache/velocity/test/ForeachTestCase.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/ForeachTestCase.java
@@ -16,7 +16,7 @@ package org.apache.velocity.test;
* "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.RuntimeConstants;
@@ -49,9 +49,9 @@ public class ForeachTestCase extends BaseTestCase
engine.setProperty(RuntimeConstants.MAX_NUMBER_LOOPS,
new Integer(3));
- assertEvalEquals("1 2 3 ", "#foreach ($item in [1..10])$item #end");
+ assertEvalEquals("1 2 3 ", "#foreach ($item in [1..10])$item #end");
}
-
+
/**
* Tests proper method execution during a Foreach loop over a Collection
* with items of varying classes.
@@ -65,7 +65,7 @@ public class ForeachTestCase extends BaseTestCase
context.put("helper", new ForeachMethodCallHelper());
context.put("col", col);
- assertEvalEquals("int 100 str STRVALUE ", "#foreach ( $item in $col )$helper.getFoo($item) #end");
+ assertEvalEquals("int 100 str STRVALUE ", "#foreach ( $item in $col )$helper.getFoo($item) #end");
}
/**
@@ -78,7 +78,7 @@ public class ForeachTestCase extends BaseTestCase
{
context.put("iterable", new MyIterable());
- assertEvalEquals("1 2 3 ", "#foreach ($i in $iterable)$i #end");
+ assertEvalEquals("1 2 3 ", "#foreach ($i in $iterable)$i #end");
}
public void testNotReallyIterableIteratorMethod()
@@ -86,7 +86,7 @@ public class ForeachTestCase extends BaseTestCase
{
context.put("nri", new NotReallyIterable());
- assertEvalEquals("", "#foreach ($i in $nri)$i #end");
+ assertEvalEquals("", "#foreach ($i in $nri)$i #end");
}
public void testVelocityHasNextProperty()
@@ -97,8 +97,8 @@ public class ForeachTestCase extends BaseTestCase
list.add("test2");
list.add("test3");
context.put("list", list);
- assertEvalEquals("test1 SEPARATOR test2 SEPARATOR test3 ", "#foreach ($value in $list)$value #if( $foreach.hasNext )SEPARATOR #end#end");
- }
+ assertEvalEquals("test1 SEPARATOR test2 SEPARATOR test3 ", "#foreach ($value in $list)$value #if( $foreach.hasNext )SEPARATOR #end#end");
+ }
public void testNestedVelocityHasNextProperty()
throws Exception
@@ -115,9 +115,9 @@ public class ForeachTestCase extends BaseTestCase
list2.add("a3");
context.put("list2", list2);
- assertEvalEquals("test1 (a1;a2;a3)-test2 (a1;a2;a3)-test3 (a1;a2;a3)-test4 (a1;a2;a3)", "#foreach ($value in $list)$value (#foreach ($val in $list2)$val#if( $foreach.hasNext );#end#end)#if( $foreach.hasNext )-#end#end");
- }
-
+ assertEvalEquals("test1 (a1;a2;a3)-test2 (a1;a2;a3)-test3 (a1;a2;a3)-test4 (a1;a2;a3)", "#foreach ($value in $list)$value (#foreach ($val in $list2)$val#if( $foreach.hasNext );#end#end)#if( $foreach.hasNext )-#end#end");
+ }
+
public static class MyIterable
{
private List foo;
@@ -129,7 +129,7 @@ public class ForeachTestCase extends BaseTestCase
foo.add(new Long(2));
foo.add("3");
}
-
+
public Iterator iterator()
{
return foo.iterator();
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/GetAsTestCase.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/GetAsTestCase.java
index 46ab10e0..776f0b43 100644
--- a/velocity-engine-core/src/test/java/org/apache/velocity/test/GetAsTestCase.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/GetAsTestCase.java
@@ -16,7 +16,7 @@ package org.apache.velocity.test;
* "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.util.TemplateBoolean;
@@ -143,5 +143,3 @@ public class GetAsTestCase extends BaseTestCase
}
}
-
-
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/IfEmptyTestCase.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/IfEmptyTestCase.java
index 5379b6a2..51aea783 100644
--- a/velocity-engine-core/src/test/java/org/apache/velocity/test/IfEmptyTestCase.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/IfEmptyTestCase.java
@@ -16,7 +16,7 @@ package org.apache.velocity.test;
* "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.util.Collections;
@@ -91,5 +91,3 @@ public class IfEmptyTestCase extends BaseTestCase
}
}
-
-
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/IfNullTestCase.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/IfNullTestCase.java
index 5bf66d5e..d34a53ec 100755
--- a/velocity-engine-core/src/test/java/org/apache/velocity/test/IfNullTestCase.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/IfNullTestCase.java
@@ -16,7 +16,7 @@ package org.apache.velocity.test;
* "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.VelocityContext;
@@ -98,5 +98,3 @@ public class IfNullTestCase extends BaseTestCase
}
}
-
-
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/IndexTestCase.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/IndexTestCase.java
index 60822448..e94c567a 100644
--- a/velocity-engine-core/src/test/java/org/apache/velocity/test/IndexTestCase.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/IndexTestCase.java
@@ -16,7 +16,7 @@ package org.apache.velocity.test;
* "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.RuntimeConstants;
@@ -37,12 +37,12 @@ public class IndexTestCase extends BaseTestCase
{
super.setUp();
engine.setProperty(RuntimeConstants.RUNTIME_REFERENCES_STRICT, Boolean.TRUE);
-
+
context.put("NULL", null);
context.put("red", "blue");
-
+
int[] a = {1, 2, 3};
- context.put("a", a);
+ context.put("a", a);
String[] str = {"a", "ab", "abc"};
context.put("str", str);
@@ -90,10 +90,10 @@ public class IndexTestCase extends BaseTestCase
assertEvalEquals("BIG TRUEaBIG FALSE", "$foo[true]a$foo[false]");
assertEvalEquals("junk foobar ", "$foo[\"junk\"]");
assertEvalEquals("GOT NULL", "#set($i=$NULL)$boo[$i]");
-
+
assertEvalEquals("321", "$a[-1]$a[ -2]$a[-3 ]");
assertEvalEquals("67xx", "#set($hash={1:11, 5:67, 23:2})$hash[5]$!hash[6]#if(!$hash[1000])xx#end");
-
+
// Some cases that should be evaluated as text
assertEvalEquals("[]", "[]");
assertEvalEquals("$[]", "$[]");
@@ -121,8 +121,8 @@ public class IndexTestCase extends BaseTestCase
assertEvalEquals("2112", "#set($a[-1] = 2112)$a[2]");
assertEvalEquals("3344","#set($hash = {1:11, 2:22, 5:66})#set($hash[2]=33)#set($hash[3]=44)$hash[2]$hash[3]");
}
-
-
+
+
public void testErrorHandling()
{
assertEvalExceptionAt("$boo['throwex']", 1, 5);
@@ -131,8 +131,8 @@ public class IndexTestCase extends BaseTestCase
assertEvalExceptionAt("#set($foo[1] = 3)", 1, 10);
assertEvalExceptionAt("$a[500]", 1, 3);
}
-
-
+
+
public static class Foo
{
public Object bar = null;
@@ -148,7 +148,7 @@ public class IndexTestCase extends BaseTestCase
else
return "BIG FALSE";
}
-
+
public String get(String str)
{
return str + " foobar ";
@@ -165,6 +165,6 @@ public class IndexTestCase extends BaseTestCase
throw new RuntimeException("Generated Exception");
return obj;
- }
- }
+ }
+ }
}
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/IntrospectionCacheDataTestCase.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/IntrospectionCacheDataTestCase.java
index 8887d7ab..9c365241 100644
--- a/velocity-engine-core/src/test/java/org/apache/velocity/test/IntrospectionCacheDataTestCase.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/IntrospectionCacheDataTestCase.java
@@ -16,7 +16,7 @@ package org.apache.velocity.test;
* "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 junit.framework.TestCase;
@@ -36,14 +36,14 @@ import java.io.StringWriter;
* @author <a href="Alexey Pachenko">alex+news@olmisoft.com</a>
* @version $Id$
*/
-public class IntrospectionCacheDataTestCase extends TestCase
+public class IntrospectionCacheDataTestCase extends TestCase
{
-
- private static class CacheHitCountingVelocityContext extends VelocityContext
+
+ private static class CacheHitCountingVelocityContext extends VelocityContext
{
public int cacheHit = 0;
-
- public IntrospectionCacheData icacheGet(Object key)
+
+ public IntrospectionCacheData icacheGet(Object key)
{
final IntrospectionCacheData result = super.icacheGet(key);
if (result != null) {
@@ -51,11 +51,11 @@ public class IntrospectionCacheDataTestCase extends TestCase
}
return result;
}
-
+
}
-
- public void testCache() throws ParseErrorException, MethodInvocationException,
- ResourceNotFoundException, IOException
+
+ public void testCache() throws ParseErrorException, MethodInvocationException,
+ ResourceNotFoundException, IOException
{
CacheHitCountingVelocityContext context = new CacheHitCountingVelocityContext();
context.put("this", this);
@@ -64,17 +64,17 @@ public class IntrospectionCacheDataTestCase extends TestCase
assertEquals("[a][b]", w.toString());
assertTrue(context.cacheHit > 0);
}
-
-
- /**
+
+
+ /**
* For use when acting as a context reference.
- *
+ *
* @param value
* @return
*/
- public String exec(String value)
+ public String exec(String value)
{
return "[" + value + "]";
}
-
+
}
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/Introspector2TestCase.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/Introspector2TestCase.java
index 9afaebb2..d98de488 100644
--- a/velocity-engine-core/src/test/java/org/apache/velocity/test/Introspector2TestCase.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/Introspector2TestCase.java
@@ -16,7 +16,7 @@ package org.apache.velocity.test;
* "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 junit.framework.Test;
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/Introspector3TestCase.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/Introspector3TestCase.java
index d7a53f02..8b3e9bb3 100644
--- a/velocity-engine-core/src/test/java/org/apache/velocity/test/Introspector3TestCase.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/Introspector3TestCase.java
@@ -16,7 +16,7 @@ package org.apache.velocity.test;
* "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 junit.framework.Test;
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/IntrospectorTestCase.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/IntrospectorTestCase.java
index 7476ef6a..8b4150f2 100644
--- a/velocity-engine-core/src/test/java/org/apache/velocity/test/IntrospectorTestCase.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/IntrospectorTestCase.java
@@ -16,7 +16,7 @@ package org.apache.velocity.test;
* "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 junit.framework.Test;
@@ -44,7 +44,7 @@ public class IntrospectorTestCase extends BaseTestCase
private static MethodProvider mp;
private Introspector introspector;
-
+
public void setUp()
{
mp = new MethodProvider();
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/InvalidEventHandlerTestCase.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/InvalidEventHandlerTestCase.java
index 791f7a09..b42f0ce8 100644
--- a/velocity-engine-core/src/test/java/org/apache/velocity/test/InvalidEventHandlerTestCase.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/InvalidEventHandlerTestCase.java
@@ -16,7 +16,7 @@ package org.apache.velocity.test;
* "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 junit.framework.Test;
@@ -48,23 +48,23 @@ extends TestCase
// @@ VELOCITY-553
public class TestObject {
private String nullValueAttribute = null;
-
+
public String getNullValueAttribute() {
return nullValueAttribute;
- }
+ }
public String getRealString() {
return new String("helloFooRealStr");
- }
-
+ }
+
public String getString() {
return new String("helloFoo");
}
public String getNullString() {
return null;
- }
-
+ }
+
public java.util.Date getNullDate() {
return null;
}
@@ -80,7 +80,7 @@ extends TestCase
}
// @@ VELOCITY-553
-
+
/**
* Default constructor.
*/
@@ -88,39 +88,39 @@ extends TestCase
{
super(name);
}
-
+
public static Test suite ()
{
return new TestSuite(InvalidEventHandlerTestCase.class);
}
-
+
public void testManualEventHandlers()
throws Exception
{
TestEventCartridge te = new TestEventCartridge();
-
+
/**
* Test attaching the event cartridge to the context
*/
VelocityEngine ve = new VelocityEngine();
ve.init();
-
+
/*
* lets make a Context and add the event cartridge
*/
-
+
VelocityContext inner = new VelocityContext();
-
+
/*
* Now make an event cartridge, register all the
* event handlers (at once) and attach it to the
* Context
*/
-
+
EventCartridge ec = new EventCartridge();
ec.addEventHandler(te);
ec.attachToContext( inner );
-
+
doTestInvalidReferenceEventHandler0(ve, inner);
doTestInvalidReferenceEventHandler1(ve, inner);
doTestInvalidReferenceEventHandler2(ve, inner);
@@ -162,22 +162,22 @@ extends TestCase
Tree test2 = new Tree();
test2.setField("12");
test.setChild(test2);
-
+
context.put("tree",test);
String s;
Writer w;
-
+
// show work fine
s = "$tree.Field $tree.field $tree.child.Field";
w = new StringWriter();
ve.evaluate(context, w, "mystring", s);
-
+
s = "$tree.x $tree.field.x $tree.child.y $tree.child.Field.y";
w = new StringWriter();
ve.evaluate(context, w, "mystring", s);
-
+
}
-
+
/**
* Test invalid #set
* @param ve
@@ -191,10 +191,10 @@ extends TestCase
context.put("a1", new Integer(5));
context.put("a4", new Integer(5));
context.put("b1","abc");
-
+
String s;
Writer w;
-
+
// good object, bad right hand side
s = "#set($xx = $a1.afternoon())";
w = new StringWriter();
@@ -202,7 +202,7 @@ extends TestCase
ve.evaluate( context, w, "mystring", s );
fail("Expected exception.");
} catch (RuntimeException e) {}
-
+
// good object, bad right hand reference
s = "#set($yy = $q1)";
w = new StringWriter();
@@ -210,7 +210,7 @@ extends TestCase
ve.evaluate( context, w, "mystring", s );
fail("Expected exception.");
} catch (RuntimeException e) {}
-
+
}
/**
@@ -226,10 +226,10 @@ extends TestCase
context.put("a1",new Integer(5));
context.put("a4",new Integer(5));
context.put("b1","abc");
-
+
String s;
Writer w;
-
+
// good object, bad method
s = "$a1.afternoon()";
w = new StringWriter();
@@ -262,9 +262,9 @@ extends TestCase
s = "$b1.baby()";
w = new StringWriter();
ve.evaluate( context, w, "mystring", s );
- assertEquals("www",w.toString());
+ assertEquals("www",w.toString());
}
-
+
/**
* Test invalid gets/references
* @param ve
@@ -275,17 +275,17 @@ extends TestCase
throws Exception
{
String result;
-
+
VelocityContext context = new VelocityContext(vc);
context.put("a1",new Integer(5));
context.put("a4",new Integer(5));
context.put("b1","abc");
-
+
// normal - should be no calls to handler
String s = "$a1 $a1.intValue() $b1 $b1.length() #set($c1 = '5')";
Writer w = new StringWriter();
ve.evaluate(context, w, "mystring", s);
-
+
// good object, bad property
s = "$a1.foobar";
w = new StringWriter();
@@ -307,7 +307,7 @@ extends TestCase
assertEquals("no",w.toString());
- // bad object, bad property
+ // bad object, bad property
s = "$a2.foobar";
w = new StringWriter();
try {
@@ -335,7 +335,7 @@ extends TestCase
ve.evaluate( context, w, "mystring", s );
assertEquals("no", w.toString());
- // bad object, no property
+ // bad object, no property
s = "$a3";
w = new StringWriter();
try {
@@ -363,7 +363,7 @@ extends TestCase
ve.evaluate( context, w, "mystring", s );
result = w.toString();
assertEquals("zzz", result);
-
+
}
/**
@@ -458,17 +458,17 @@ extends TestCase
/**
* Test assigning the event handlers via properties
*/
-
+
public static class TestEventCartridge
implements InvalidReferenceEventHandler,
RuntimeServicesAware
{
private RuntimeServices rs;
-
+
public TestEventCartridge()
{
}
-
+
/**
* Required by EventHandler
*/
@@ -477,18 +477,18 @@ extends TestCase
// make sure this is only called once
if (this.rs == null)
this.rs = rs;
-
+
else
fail("initialize called more than once.");
}
-
-
+
+
public Object invalidGetMethod(Context context, String reference, Object object, String property, Info info)
{
// as a test, make sure this EventHandler is initialized
if (rs == null)
fail ("Event handler not initialized!");
-
+
// good object, bad property
if (reference.equals("$a1.foobar"))
{
@@ -496,23 +496,23 @@ extends TestCase
assertEquals("foobar",property);
throw new RuntimeException("expected exception");
}
-
- // bad object, bad property
+
+ // bad object, bad property
else if (reference.equals("$a2"))
{
assertNull(object);
assertNull(property);
throw new RuntimeException("expected exception");
}
-
- // bad object, no property
+
+ // bad object, no property
else if (reference.equals("$a3"))
{
assertNull(object);
assertNull(property);
throw new RuntimeException("expected exception");
}
-
+
// good object, bad property; change the value
else if (reference.equals("$a4.foobar"))
{
@@ -535,7 +535,7 @@ extends TestCase
}
-
+
else if (reference.equals("$tree.x"))
{
assertEquals("x",property);
@@ -550,19 +550,19 @@ extends TestCase
{
assertEquals("y",property);
}
-
+
else if (reference.equals("$tree.child.Field.y"))
{
assertEquals("y",property);
}
-
+
else
{
fail("invalidGetMethod: unexpected reference: " + reference);
}
return null;
}
-
+
public Object invalidMethod(Context context, String reference, Object object, String method, Info info)
{
// as a test, make sure this EventHandler is initialized
@@ -583,13 +583,13 @@ extends TestCase
}
else
- {
+ {
fail("Unexpected invalid method. " + method);
}
return null;
- }
-
+ }
+
public boolean invalidSetMethod(Context context, String leftreference, String rightreference, Info info)
{
@@ -610,10 +610,10 @@ extends TestCase
throw new RuntimeException("expected exception");
}
else
- {
+ {
fail("Unexpected left hand side. " + leftreference);
}
-
+
return false;
}
@@ -623,10 +623,10 @@ extends TestCase
{
String field;
Tree child;
-
+
public Tree()
{
-
+
}
public String getField()
@@ -649,10 +649,10 @@ extends TestCase
this.child = child;
}
- public String testMethod()
+ public String testMethod()
{
return "123";
}
}
-
+
}
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/MacroAutoReloadTestCase.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/MacroAutoReloadTestCase.java
index bd3f75e2..37b84b44 100644
--- a/velocity-engine-core/src/test/java/org/apache/velocity/test/MacroAutoReloadTestCase.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/MacroAutoReloadTestCase.java
@@ -16,7 +16,7 @@ package org.apache.velocity.test;
* "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.VelocityContext;
@@ -66,7 +66,7 @@ public class MacroAutoReloadTestCase extends BaseTestCase
context = new VelocityContext();
}
-
+
public void testChangedMacro() throws Exception
{
String template = "#foo('hip')";
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/MacroCommentsTestCase.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/MacroCommentsTestCase.java
index 86259750..38822fdf 100644
--- a/velocity-engine-core/src/test/java/org/apache/velocity/test/MacroCommentsTestCase.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/MacroCommentsTestCase.java
@@ -16,7 +16,7 @@ package org.apache.velocity.test;
* "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.ParseErrorException;
@@ -35,7 +35,7 @@ public class MacroCommentsTestCase extends BaseTestCase
{
super.setUp();
}
-
+
public void testComments()
{
assertEvalEquals("ab","#macro(foo ##\n $bar \n ## blaa\n $bar2##\n)$bar$bar2#end#foo(\"a\" \"b\")");
@@ -44,7 +44,7 @@ public class MacroCommentsTestCase extends BaseTestCase
assertEvalEquals("","#macro(foo4 ## test\n ## test2 ## test3 \n)#end#foo4()");
assertEvalEquals("","#macro(foo4 ## test\n $x = 5 ## test2 ## test3 \n)#end#foo4()");
}
-
+
public void testErrors()
{
// We only allow comment lines in macro definitions
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/MacroDefaultArgTestCase.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/MacroDefaultArgTestCase.java
index 1172131f..ec056920 100644
--- a/velocity-engine-core/src/test/java/org/apache/velocity/test/MacroDefaultArgTestCase.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/MacroDefaultArgTestCase.java
@@ -16,7 +16,7 @@ package org.apache.velocity.test;
* "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.RuntimeConstants;
@@ -52,7 +52,7 @@ public class MacroDefaultArgTestCase extends BaseTestCase
assertEvalEquals("3 2 5 2 5 [1, 2] ", "#macro(foo, $a=$x $b =2 )$a $b #end#set($x=3)#foo()#foo(5)#foo(5 [1,2])");
assertEvalEquals("{a=3} 2 5 2 5 [1, 2] ", "#macro(foo, $a = {\"a\":$x} $b =2 )$a $b #end#set($x=3)#foo()#foo(5)#foo(5 [1,2])");
-
+
assertEvalEquals("3 2 5 2 5 [1, 2] ", "#macro(foo, $a = \"$x\" $b =2 )$a $b #end#set($x=3)#foo()#foo(5)#foo(5 [1,2])");
assertEvalEquals("3$y 2 5 2 5 [1, 2] ", "#macro(foo, $a = \"$x\\$y\" $b =2 )$a $b #end#set($x=3)#foo()#foo(5)#foo(5 [1,2])");
assertEvalEquals("5 3 2 5 [1, 2] 2 ", "#macro(foo, $c $a = \"$x\" $b =2 )$c $a $b #end#set($x=3)#foo(5)#foo(5 [1,2])");
@@ -61,7 +61,7 @@ public class MacroDefaultArgTestCase extends BaseTestCase
assertEvalEquals("xy", "#macro(foo $a=\"$b$c\"##\n)$a#end#set($b=\"x\")#set($c=\"y\")#foo()");
}
-
+
public void testErrors()
{
assertEvalException("#macro(foo $a = 1 $b)#end");
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/MethodCacheKeyTestCase.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/MethodCacheKeyTestCase.java
index e3a88976..1eb02190 100644
--- a/velocity-engine-core/src/test/java/org/apache/velocity/test/MethodCacheKeyTestCase.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/MethodCacheKeyTestCase.java
@@ -16,7 +16,7 @@ package org.apache.velocity.test;
* "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 junit.framework.TestCase;
@@ -29,60 +29,60 @@ import org.apache.velocity.runtime.parser.node.ASTMethod;
* @author <a href="Will Glass-Husain">wglass@forio.com</a>
* @version $Id$
*/
-public class MethodCacheKeyTestCase extends TestCase
+public class MethodCacheKeyTestCase extends TestCase
{
-
+
public void testMethodKeyCacheEquals()
{
Class [] elements1 = new Class [] { Object.class };
ASTMethod.MethodCacheKey mck1 = new ASTMethod.MethodCacheKey("test",elements1);
-
+
selfEqualsAssertions(mck1);
-
+
Class [] elements2 = new Class [] { Object.class };
ASTMethod.MethodCacheKey mck2 = new ASTMethod.MethodCacheKey("test",elements2);
-
+
assertTrue(mck1.equals(mck2));
-
+
Class [] elements3 = new Class [] { String.class };
ASTMethod.MethodCacheKey mck3 = new ASTMethod.MethodCacheKey("test",elements3);
-
+
assertFalse(mck1.equals(mck3));
-
+
Class [] elements4 = new Class [] { Object.class };
ASTMethod.MethodCacheKey mck4 = new ASTMethod.MethodCacheKey("boo",elements4);
-
+
assertFalse(mck1.equals(mck4));
-
+
/** check for potential NPE's **/
Class [] elements5 = ArrayUtils.EMPTY_CLASS_ARRAY;
ASTMethod.MethodCacheKey mck5 = new ASTMethod.MethodCacheKey("boo",elements5);
selfEqualsAssertions(mck5);
-
+
Class [] elements6 = null;
ASTMethod.MethodCacheKey mck6 = new ASTMethod.MethodCacheKey("boo",elements6);
selfEqualsAssertions(mck6);
-
+
Class [] elements7 = new Class [] {};
ASTMethod.MethodCacheKey mck7 = new ASTMethod.MethodCacheKey("boo",elements7);
selfEqualsAssertions(mck7);
-
+
Class [] elements8 = new Class [] {null};
ASTMethod.MethodCacheKey mck8 = new ASTMethod.MethodCacheKey("boo",elements8);
- selfEqualsAssertions(mck8);
-
+ selfEqualsAssertions(mck8);
+
Class [] elements9 = new Class [] { Object.class };
ASTMethod.MethodCacheKey mck9 = new ASTMethod.MethodCacheKey("boo",elements9);
- selfEqualsAssertions(mck9);
-
+ selfEqualsAssertions(mck9);
+
}
-
+
private void selfEqualsAssertions(ASTMethod.MethodCacheKey mck)
{
assertTrue(mck.equals(mck));
assertTrue(!mck.equals(null));
assertTrue(!mck.equals((ASTMethod.MethodCacheKey) null));
}
-
-
+
+
}
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/MethodInvocationExceptionTestCase.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/MethodInvocationExceptionTestCase.java
index 62b53779..e8488258 100644
--- a/velocity-engine-core/src/test/java/org/apache/velocity/test/MethodInvocationExceptionTestCase.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/MethodInvocationExceptionTestCase.java
@@ -16,7 +16,7 @@ package org.apache.velocity.test;
* "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 junit.framework.Test;
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/MethodOverloadingTestCase.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/MethodOverloadingTestCase.java
index e81889c7..4030b646 100644
--- a/velocity-engine-core/src/test/java/org/apache/velocity/test/MethodOverloadingTestCase.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/MethodOverloadingTestCase.java
@@ -16,7 +16,7 @@ package org.apache.velocity.test;
* "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 junit.framework.Test;
@@ -34,17 +34,17 @@ import java.io.OutputStreamWriter;
import java.io.Writer;
/**
- * Test a reported bug in which method overloading throws IllegalArgumentException
+ * Test a reported bug in which method overloading throws IllegalArgumentException
* after a null return value.
* (VELOCITY-132).
- *
+ *
* @author <a href="mailto:wglass@forio.com">Will Glass-Husain</a>
* @version $Id$
*/
public class MethodOverloadingTestCase extends BaseTestCase
{
String logData;
-
+
/**
* VTL file extension.
*/
@@ -112,11 +112,11 @@ public class MethodOverloadingTestCase extends BaseTestCase
* test overloading in a file included with #parse
*/
testFile("main");
-
+
assertTrue(logData.indexOf("IllegalArgumentException") == -1);
-
+
}
-
+
public void testFile(String basefilename)
throws Exception
{
@@ -125,19 +125,19 @@ public class MethodOverloadingTestCase extends BaseTestCase
ve.addProperty(RuntimeConstants.FILE_RESOURCE_LOADER_PATH, FILE_RESOURCE_LOADER_PATH);
ve.setProperty(VelocityEngine.RUNTIME_LOG_INSTANCE, logger );
ve.init();
-
+
Template template;
FileOutputStream fos;
Writer fwriter;
Context context;
-
+
template = ve.getTemplate( getFileName(null, basefilename, TMPL_FILE_EXT) );
-
+
fos = new FileOutputStream (
getFileName(RESULTS_DIR, basefilename, RESULT_FILE_EXT));
-
+
fwriter = new BufferedWriter( new OutputStreamWriter(fos) );
-
+
context = new VelocityContext();
setupContext(context);
logger.on();
@@ -145,37 +145,37 @@ public class MethodOverloadingTestCase extends BaseTestCase
logger.off();
fwriter.flush();
fwriter.close();
-
+
if (!isMatch(RESULTS_DIR, COMPARE_DIR, basefilename, RESULT_FILE_EXT, CMP_FILE_EXT))
{
fail("Output incorrect.");
}
logData = logger.getLog();
}
-
+
public void setupContext(Context context)
{
context.put("test", this);
- context.put("nullValue", null);
- }
-
-
+ context.put("nullValue", null);
+ }
+
+
public String overloadedMethod ( Integer s )
{
return "Integer";
}
-
+
public String overloadedMethod ( String s )
{
return "String";
}
-
-
+
+
public String overloadedMethod2 ( Integer s )
{
return "Integer";
}
-
+
public String overloadedMethod2 ( String i )
{
return "String";
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/MiscTestCase.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/MiscTestCase.java
index 33ad6429..0936e314 100644
--- a/velocity-engine-core/src/test/java/org/apache/velocity/test/MiscTestCase.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/MiscTestCase.java
@@ -16,7 +16,7 @@ package org.apache.velocity.test;
* "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 junit.framework.Test;
@@ -53,7 +53,7 @@ public class MiscTestCase extends BaseTestCase
ri.setProperty("baabaa.test","the answer");
assertEquals("the answer",ri.getProperty("baabaa.test"));
}
-
+
public void testStringUtils()
{
/*
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/NumberMethodCallsTestCase.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/NumberMethodCallsTestCase.java
index 65a6944e..0c706468 100644
--- a/velocity-engine-core/src/test/java/org/apache/velocity/test/NumberMethodCallsTestCase.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/NumberMethodCallsTestCase.java
@@ -16,7 +16,7 @@ package org.apache.velocity.test;
* "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 junit.framework.Test;
@@ -139,5 +139,3 @@ public class NumberMethodCallsTestCase extends TestCase
}
-
-
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/ParseWithMacroLibsTestCase.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/ParseWithMacroLibsTestCase.java
index adf12f20..586ce921 100644
--- a/velocity-engine-core/src/test/java/org/apache/velocity/test/ParseWithMacroLibsTestCase.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/ParseWithMacroLibsTestCase.java
@@ -59,7 +59,7 @@ public class ParseWithMacroLibsTestCase extends BaseTestCase
{
return new TestSuite(ParseWithMacroLibsTestCase.class);
}
-
+
public void testParseMacroLocalCacheOn()
throws Exception
{
@@ -71,7 +71,7 @@ public class ParseWithMacroLibsTestCase extends BaseTestCase
// render twice to make sure there is no difference with cached templates
testParseMacro(ve, "vm_library1.vm", "parseMacro1_1", false);
testParseMacro(ve, "vm_library1.vm", "parseMacro1_1", false);
-
+
// run again with different macro library
testParseMacro(ve, "vm_library2.vm", "parseMacro1_1b", false);
testParseMacro(ve, "vm_library2.vm", "parseMacro1_1b", false);
@@ -110,7 +110,7 @@ public class ParseWithMacroLibsTestCase extends BaseTestCase
testParseMacro(ve, "vm_library2.vm", "parseMacro1_3b", false);
testParseMacro(ve, "vm_library2.vm", "parseMacro1_3b", false);
}
-
+
public void testParseMacroGlobalCacheOff()
throws Exception
{
@@ -120,12 +120,12 @@ public class ParseWithMacroLibsTestCase extends BaseTestCase
VelocityEngine ve = createEngine(false, false);
testParseMacro(ve, "vm_library1.vm", "parseMacro1_4", true);
-
+
// run again with different macro library
testParseMacro(ve, "vm_library2.vm", "parseMacro1_4b", true);
}
-
+
/**
* Test #parse with macros. Can be used to test different engine configurations
* @param ve
@@ -165,7 +165,7 @@ public class ParseWithMacroLibsTestCase extends BaseTestCase
"-----Result-----\n"+ result +
"----Expected----\n"+ compare +
"----------------";
-
+
fail(msg);
}
@@ -199,11 +199,11 @@ public class ParseWithMacroLibsTestCase extends BaseTestCase
ve.setProperty(RuntimeConstants.FILE_RESOURCE_LOADER_PATH,
TEST_COMPARE_DIR + "/parsemacros");
ve.init();
-
+
return ve;
}
-
-
+
+
/**
* Test whether the literal text is given if a definition cannot be
* found for a macro.
@@ -217,7 +217,7 @@ public class ParseWithMacroLibsTestCase extends BaseTestCase
* ve1: local scope, cache on
*/
VelocityEngine ve1 = new VelocityEngine();
-
+
ve1.setProperty( Velocity.VM_PERM_INLINE_LOCAL, Boolean.TRUE);
ve1.setProperty("velocimacro.permissions.allow.inline.to.replace.global",
Boolean.FALSE);
@@ -228,7 +228,7 @@ public class ParseWithMacroLibsTestCase extends BaseTestCase
ve1.setProperty(RuntimeConstants.FILE_RESOURCE_LOADER_PATH,
TEST_COMPARE_DIR + "/parsemacros");
ve1.init();
-
+
assureResultsDirectoryExists(RESULT_DIR);
FileOutputStream fos = new FileOutputStream (getFileName(
@@ -267,7 +267,7 @@ public class ParseWithMacroLibsTestCase extends BaseTestCase
* ve1: local scope, cache on
*/
VelocityEngine ve1 = new VelocityEngine();
-
+
ve1.setProperty( Velocity.VM_PERM_INLINE_LOCAL, Boolean.TRUE);
ve1.setProperty("velocimacro.permissions.allow.inline.to.replace.global",
Boolean.FALSE);
@@ -278,7 +278,7 @@ public class ParseWithMacroLibsTestCase extends BaseTestCase
ve1.setProperty(RuntimeConstants.FILE_RESOURCE_LOADER_PATH,
TEST_COMPARE_DIR + "/parsemacros");
ve1.init();
-
+
assureResultsDirectoryExists(RESULT_DIR);
FileOutputStream fos = new FileOutputStream (getFileName(
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/ParserTestCase.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/ParserTestCase.java
index 6e8bb2be..56601a1c 100644
--- a/velocity-engine-core/src/test/java/org/apache/velocity/test/ParserTestCase.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/ParserTestCase.java
@@ -16,7 +16,7 @@ package org.apache.velocity.test;
* "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 junit.framework.Test;
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/PropertyMethodPrecedenceTestCase.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/PropertyMethodPrecedenceTestCase.java
index ec9f75f3..c67b8dc3 100755
--- a/velocity-engine-core/src/test/java/org/apache/velocity/test/PropertyMethodPrecedenceTestCase.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/PropertyMethodPrecedenceTestCase.java
@@ -16,7 +16,7 @@ package org.apache.velocity.test;
* "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.VelocityContext;
@@ -100,5 +100,3 @@ public class PropertyMethodPrecedenceTestCase extends BaseTestCase
}
}
-
-
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/RenderVelocityTemplateTest.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/RenderVelocityTemplateTest.java
index 5c2865f8..92742958 100644
--- a/velocity-engine-core/src/test/java/org/apache/velocity/test/RenderVelocityTemplateTest.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/RenderVelocityTemplateTest.java
@@ -45,8 +45,8 @@ public class RenderVelocityTemplateTest
return stringWriter.toString();
}
}
-
-
+
+
private static final String templateString = "" + //
"#macro (showhelloworld $foo)\n" + //
"Hello, World\n" + //
@@ -61,7 +61,7 @@ public class RenderVelocityTemplateTest
"<p>#showhelloworld ($foo)</p>\n" + //
"</body>\n" + //
"</html>";
-
+
public void testMultipleEvals()
throws Exception
{
@@ -71,18 +71,18 @@ public class RenderVelocityTemplateTest
for (int i = 0; i < 1000; ++i)
{
result = template.getContent();
-
+
// Verify that the original macro invocation has been replaced with its result.
int index = result.indexOf("#showhelloworld");
if (index != -1)
{
throw new AssertionError("Failed to substitute macro:\n" + result);
}
-
+
// Verify that the macro did indeed expand.
int indexHW = result.indexOf("<p>Hello, World");
Assert.assertTrue(indexHW >= 0);
-
+
// Assert.assertEquals("", result); // enable to show what we really get
}
}
@@ -138,7 +138,7 @@ public class RenderVelocityTemplateTest
{
t.start();
}
-
+
for (Thread t : threads)
{
t.join();
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/ResourceExistsTestCase.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/ResourceExistsTestCase.java
index 518e8da5..50460214 100755
--- a/velocity-engine-core/src/test/java/org/apache/velocity/test/ResourceExistsTestCase.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/ResourceExistsTestCase.java
@@ -16,7 +16,7 @@ package org.apache.velocity.test;
* "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.VelocityEngine;
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/ScopeTestCase.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/ScopeTestCase.java
index 59bf775e..d9c08ba9 100755
--- a/velocity-engine-core/src/test/java/org/apache/velocity/test/ScopeTestCase.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/ScopeTestCase.java
@@ -16,7 +16,7 @@ package org.apache.velocity.test;
* "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.VelocityEngine;
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/SetTestCase.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/SetTestCase.java
index 854ee4e6..130ed937 100644
--- a/velocity-engine-core/src/test/java/org/apache/velocity/test/SetTestCase.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/SetTestCase.java
@@ -16,7 +16,7 @@ package org.apache.velocity.test;
* "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;
@@ -141,4 +141,3 @@ public class SetTestCase extends BaseTestCase
assertEvalEquals("","#set($b = !$a)");
}
}
-
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/StaticUtilityMethodsTestCase.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/StaticUtilityMethodsTestCase.java
index 18603799..60cabbf6 100755
--- a/velocity-engine-core/src/test/java/org/apache/velocity/test/StaticUtilityMethodsTestCase.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/StaticUtilityMethodsTestCase.java
@@ -16,7 +16,7 @@ package org.apache.velocity.test;
* "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.
*/
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/StrictCompareTestCase.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/StrictCompareTestCase.java
index 11c60680..89f8523b 100644
--- a/velocity-engine-core/src/test/java/org/apache/velocity/test/StrictCompareTestCase.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/StrictCompareTestCase.java
@@ -16,7 +16,7 @@ package org.apache.velocity.test;
* "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.VelocityException;
@@ -52,7 +52,7 @@ public class StrictCompareTestCase extends BaseTestCase
assertVelocityEx("#if($NULL > $a)#end");
assertVelocityEx("#if($NULL < $a)#end");
- assertVelocityEx("#if($NULL >= $a)#end");
+ assertVelocityEx("#if($NULL >= $a)#end");
assertVelocityEx("#if($NULL <= $a)#end");
assertVelocityEx("#if($NULL >= $NULL)#end");
@@ -62,9 +62,9 @@ public class StrictCompareTestCase extends BaseTestCase
assertVelocityEx("#if($a < $b)#end");
assertVelocityEx("#if($a < 5)#end");
- assertVelocityEx("#if($a > 5)#end");
+ assertVelocityEx("#if($a > 5)#end");
}
-
+
/**
* Assert that we get a VelocityException when calling evaluate
*/
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/StrictEscapeTestCase.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/StrictEscapeTestCase.java
index 2f9b5d91..846e992e 100644
--- a/velocity-engine-core/src/test/java/org/apache/velocity/test/StrictEscapeTestCase.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/StrictEscapeTestCase.java
@@ -15,7 +15,7 @@ package org.apache.velocity.test;
* "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.RuntimeConstants;
@@ -40,14 +40,14 @@ public class StrictEscapeTestCase extends BaseTestCase
context.put("animal", new Animal());
// DEBUG = true;
}
-
+
public void testReferenceEscape()
{
engine.setProperty(RuntimeConstants.RUNTIME_REFERENCES_STRICT, Boolean.TRUE);
assertEvalException("\\\\$bogus");
assertEvalException("\\\\\\\\$bogus");
-
+
assertEvalEquals("$bogus", "\\$bogus");
assertEvalEquals("$bogus.xyz", "\\$bogus.xyz");
assertEvalEquals("${bogus}", "\\${bogus}");
@@ -59,18 +59,18 @@ public class StrictEscapeTestCase extends BaseTestCase
assertEvalEquals("$pow", "#set($foo = \"\\$pow\")$foo");
assertEvalEquals("\\bang", "#set($foo = \"\\\\$pow\")$foo");
assertEvalEquals("\\$pow", "#set($foo = \"\\\\\\$pow\")$foo");
-
+
assertEvalEquals("\\$%", "\\$%");
-
+
// This should work but does not... may be related to VELOCITY-679
// This is broken from existing escape behavior
// assertEvalEquals("\\$bang", "\\$$pow");
-
+
assertEvalEquals("$!foo", "#set($foo = $NULL)\\$!foo");
assertEvalEquals("$!animal.null", "\\$!animal.null");
assertEvalEquals("$!animal", "\\$!animal");
- }
-
+ }
+
public void testMacroEscape()
{
engine.setProperty(RuntimeConstants.RUNTIME_REFERENCES_STRICT, Boolean.TRUE);
@@ -78,15 +78,15 @@ public class StrictEscapeTestCase extends BaseTestCase
// define the foo macro
assertEvalEquals("", "#macro(foo)bar#end");
-
+
assertEvalEquals("#foo()", "\\#foo()");
assertEvalEquals("\\bar", "\\\\#foo()");
assertEvalEquals("\\#foo()", "\\\\\\#foo()");
-
+
assertEvalEquals("bar", "#set($abc = \"#foo()\")$abc");
assertEvalEquals("#foo()", "#set($abc = \"\\#foo()\")$abc");
assertEvalEquals("\\bar", "#set($abc = \"\\\\#foo()\")$abc");
-
+
assertEvalEquals("#@foo()", "\\#@foo()");
assertEvalEquals("#@foo", "\\#@foo");
assertEvalEquals("#@bar", "\\#@bar");
@@ -94,14 +94,14 @@ public class StrictEscapeTestCase extends BaseTestCase
assertEvalEquals("#@foo()#end", "\\#@foo()\\#end");
assertEvalEquals("#@foo#end", "\\#@foo\\#end");
assertEvalEquals("#@bar #end", "\\#@bar \\#end");
-
+
assertEvalEquals("#end #foreach #define() #elseif", "\\#end \\#foreach \\#define() \\#elseif");
assertEvalEquals("#{end} #{foreach} #{define}() #{elseif}", "\\#{end} \\#{foreach} \\#{define}() \\#{elseif}");
assertEvalEquals("#macro(foo) #end", "\\#macro(foo) \\#end");
-
+
assertEvalException("\\\\#end");
assertEvalException("\\\\#if()");
-
+
// This should work but does not, probably related to VELOCITY-678
// this is broken from existing behavior
//assertEvalEquals("\\$bar", "\\$#foo()");
@@ -114,22 +114,22 @@ public class StrictEscapeTestCase extends BaseTestCase
{
assertEvalEquals("#bogus()", "\\#bogus()");
assertEvalEquals("\\#bogus", "\\\\#bogus");
-
+
assertEvalEquals("\\$bogus", "\\\\$bogus");
assertEvalEquals("\\\\$bogus", "\\\\\\\\$bogus");
- assertEvalEquals("\\$bogus", "#set($foo = \"\\\\$bogus\")$foo");
+ assertEvalEquals("\\$bogus", "#set($foo = \"\\\\$bogus\")$foo");
}
/**
* Test object for escaping
*/
public static class Animal
- {
+ {
public Object getNull()
{
return null;
}
-
+
public String toString()
{
return null;
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/StrictForeachTestCase.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/StrictForeachTestCase.java
index 504401e0..333790a8 100755
--- a/velocity-engine-core/src/test/java/org/apache/velocity/test/StrictForeachTestCase.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/StrictForeachTestCase.java
@@ -16,7 +16,7 @@ package org.apache.velocity.test;
* "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.VelocityException;
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/StrictMathTestCase.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/StrictMathTestCase.java
index 8222fc09..7067ce53 100755
--- a/velocity-engine-core/src/test/java/org/apache/velocity/test/StrictMathTestCase.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/StrictMathTestCase.java
@@ -16,7 +16,7 @@ package org.apache.velocity.test;
* "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.MathException;
@@ -53,7 +53,7 @@ public class StrictMathTestCase extends BaseTestCase
String infinity = "#set( $foo = $num "+operation+" $zero )";
assertEvalException(infinity, MathException.class);
}
-
+
public void testAdd()
{
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/StrictReferenceTestCase.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/StrictReferenceTestCase.java
index 62f7e8aa..999e2835 100644
--- a/velocity-engine-core/src/test/java/org/apache/velocity/test/StrictReferenceTestCase.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/StrictReferenceTestCase.java
@@ -16,7 +16,7 @@ package org.apache.velocity.test;
* "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.VelocityEngine;
@@ -57,7 +57,7 @@ public class StrictReferenceTestCase extends BaseTestCase
context.put("bar", null);
context.put("TRUE", Boolean.TRUE);
}
-
+
/**
* Test the modified behavior of #if in strict mode. Mainly, that
* single variables references in #if statements use non strict rules
@@ -81,9 +81,9 @@ public class StrictReferenceTestCase extends BaseTestCase
assertMethodEx("#if($bogus.foo)#end");
assertMethodEx("#if(!$bogus.foo)#end");
}
-
-
- /**
+
+
+ /**
* We make sure that variables can actuall hold null
* values.
*/
@@ -95,9 +95,9 @@ public class StrictReferenceTestCase extends BaseTestCase
assertEvalEquals("true", "#set($foobar = $NULL)#if($foobar == $NULL)true#end");
assertEvalEquals("13", "#set($list = [1, $NULL, 3])#foreach($item in $list)#if($item != $NULL)$item#end#end");
}
-
+
/**
- * Test that variables references that have not been defined throw exceptions
+ * Test that variables references that have not been defined throw exceptions
*/
public void testStrictVariableRef()
throws Exception
@@ -114,12 +114,12 @@ public class StrictReferenceTestCase extends BaseTestCase
assertMethodEx("#if($bogus > 1) #end");
assertMethodEx("#foreach($item in $bogus)#end");
- // make sure no exceptions are thrown here
- evaluate("#set($foo = \"bar\") $foo");
+ // make sure no exceptions are thrown here
+ evaluate("#set($foo = \"bar\") $foo");
evaluate("#macro(test1 $foo1) $foo1 #end #test1(\"junk\")");
evaluate("#macro(test2) #set($foo2 = \"bar\") $foo2 #end #test2()");
}
-
+
/**
* Test that exceptions are thrown when methods are called on
* references that contains objects that do not contains those
@@ -129,7 +129,7 @@ public class StrictReferenceTestCase extends BaseTestCase
{
Fargo fargo = new Fargo();
fargo.next = new Fargo();
- context.put("fargo", fargo);
+ context.put("fargo", fargo);
// Mainly want to make sure no exceptions are thrown here
assertEvalEquals("propiness", "$fargo.prop");
@@ -142,7 +142,7 @@ public class StrictReferenceTestCase extends BaseTestCase
assertMethodEx("#set($fargo.next.prop = $TRUE)");
assertMethodEx("$fargo.next.setProp($TRUE)");
}
-
+
/**
* Make sure exceptions are thrown when when we attempt to call
* methods on null values.
@@ -178,7 +178,7 @@ public class StrictReferenceTestCase extends BaseTestCase
{
assertVelocityEx("#bogus()");
assertVelocityEx("#bogus ( )");
- assertVelocityEx("#bogus( $a )");
+ assertVelocityEx("#bogus( $a )");
assertVelocityEx("abc#bogus ( $a )a ");
assertEvalEquals(" true ", "#macro(test1) true #end#test1()");
@@ -187,14 +187,14 @@ public class StrictReferenceTestCase extends BaseTestCase
assertEvalEquals("#F - ()", "#F - ()");
assertEvalEquals("#F{}", "#F{}");
}
-
-
+
+
public void testRenderingNull()
{
Fargo fargo = new Fargo();
fargo.next = new Fargo();
- context.put("fargo", fargo);
-
+ context.put("fargo", fargo);
+
assertVelocityEx("#set($foo = $NULL)$foo");
assertEvalEquals("", "#set($foo = $NULL)$!foo");
assertVelocityEx("$fargo.nullVal");
@@ -204,7 +204,7 @@ public class StrictReferenceTestCase extends BaseTestCase
assertVelocityEx("$fargo.next.nullVal");
assertEvalEquals("", "$!fargo.next.nullVal");
}
-
+
/**
* Assert that we get a MethodInvocationException when calling evaluate
*/
@@ -234,7 +234,7 @@ public class StrictReferenceTestCase extends BaseTestCase
{
String prop = "propiness";
Fargo next = null;
-
+
public String getProp()
{
return prop;
@@ -253,6 +253,6 @@ public class StrictReferenceTestCase extends BaseTestCase
public Fargo getNext()
{
return next;
- }
- }
+ }
+ }
}
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/StringConcatenationTestCase.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/StringConcatenationTestCase.java
index 8fc9616b..c8d7c16b 100755
--- a/velocity-engine-core/src/test/java/org/apache/velocity/test/StringConcatenationTestCase.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/StringConcatenationTestCase.java
@@ -16,7 +16,7 @@ package org.apache.velocity.test;
* "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.
*/
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/TestBaseTestCase.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/TestBaseTestCase.java
index ac419a3e..ee4afe7c 100644
--- a/velocity-engine-core/src/test/java/org/apache/velocity/test/TestBaseTestCase.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/TestBaseTestCase.java
@@ -16,7 +16,7 @@ package org.apache.velocity.test;
* "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 junit.framework.Test;
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/TextblockTestCase.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/TextblockTestCase.java
index 81396486..44891fec 100644
--- a/velocity-engine-core/src/test/java/org/apache/velocity/test/TextblockTestCase.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/TextblockTestCase.java
@@ -16,9 +16,9 @@ package org.apache.velocity.test;
* "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.node.ASTTextblock;
/**
@@ -128,7 +128,7 @@ public class TextblockTestCase extends BaseTestCase
{
assertTextblockEvalEquals("<!--#include file=\"wisdom.inc\"--> ");
}
-
+
/**
* https://issues.apache.org/jira/browse/VELOCITY-676
*/
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/URLResourceLoaderTimeoutTestCase.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/URLResourceLoaderTimeoutTestCase.java
index d6cf31f7..9d933ee6 100755
--- a/velocity-engine-core/src/test/java/org/apache/velocity/test/URLResourceLoaderTimeoutTestCase.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/URLResourceLoaderTimeoutTestCase.java
@@ -16,7 +16,7 @@ package org.apache.velocity.test;
* "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.RuntimeConstants;
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/UberspectorTestCase.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/UberspectorTestCase.java
index bce0355d..f0e495a0 100644
--- a/velocity-engine-core/src/test/java/org/apache/velocity/test/UberspectorTestCase.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/UberspectorTestCase.java
@@ -16,7 +16,7 @@ package org.apache.velocity.test;
* "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 junit.framework.Test;
@@ -297,7 +297,3 @@ public class UberspectorTestCase
* }
*/
}
-
-
-
-
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/VarargMethodsTestCase.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/VarargMethodsTestCase.java
index 1c8b5d0b..2e1641e7 100644
--- a/velocity-engine-core/src/test/java/org/apache/velocity/test/VarargMethodsTestCase.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/VarargMethodsTestCase.java
@@ -16,7 +16,7 @@ package org.apache.velocity.test;
* "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.VelocityContext;
@@ -251,5 +251,3 @@ public class VarargMethodsTestCase extends BaseTestCase
}
}
-
-
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/VelocityAppTestCase.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/VelocityAppTestCase.java
index 7c774dbf..ecc9f8fc 100644
--- a/velocity-engine-core/src/test/java/org/apache/velocity/test/VelocityAppTestCase.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/VelocityAppTestCase.java
@@ -16,7 +16,7 @@ package org.apache.velocity.test;
* "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.VelocityContext;
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/WrappedExceptionTestCase.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/WrappedExceptionTestCase.java
index 86da9054..0db5b426 100644
--- a/velocity-engine-core/src/test/java/org/apache/velocity/test/WrappedExceptionTestCase.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/WrappedExceptionTestCase.java
@@ -16,7 +16,7 @@ package org.apache.velocity.test;
* "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 junit.framework.Test;
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/eventhandler/Handler2.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/eventhandler/Handler2.java
index 14eae6b2..573e76e3 100644
--- a/velocity-engine-core/src/test/java/org/apache/velocity/test/eventhandler/Handler2.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/eventhandler/Handler2.java
@@ -16,7 +16,7 @@ package org.apache.velocity.test.eventhandler;
* "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.IncludeEventHandler;
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/VelTools66TestCase.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/VelTools66TestCase.java
index 3b2e802d..348021b2 100644
--- a/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/VelTools66TestCase.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/VelTools66TestCase.java
@@ -80,7 +80,7 @@ public class VelTools66TestCase
{
/* the testcase is obsolete in JDK 8, as SystemManager.checkMemberAccess is not anymore called
* by Class.getMethods() */
-
+
int javaVersion = Integer.parseInt(System.getProperty("java.version").split("\\.")[1]);
if (javaVersion >= 8)
{
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity532TestCase.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity532TestCase.java
index 83a5207d..16eaef1c 100755
--- a/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity532TestCase.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity532TestCase.java
@@ -16,7 +16,7 @@ package org.apache.velocity.test.issues;
* "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.test.BaseTestCase;
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity544TestCase.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity544TestCase.java
index e0e226bb..b4a01ca1 100644
--- a/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity544TestCase.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity544TestCase.java
@@ -45,31 +45,31 @@ public class Velocity544TestCase
{
context.put("foobarTrue", new Foobar(true));
context.put("foobarFalse", new Foobar(false));
-
+
String template = "$foobarTrue.True $foobarFalse.True $foobarTrue.TrueObject $foobarFalse.TrueObject";
-
+
String result = evaluate(template);
-
+
super.assertEquals("true false true false", result);
}
-
+
public static class Foobar
{
private boolean value;
-
+
public Foobar(boolean value)
{
this.value = value;
}
-
+
public boolean isTrue()
{
return(value);
}
-
+
public Boolean isTrueObject()
{
return(new Boolean(value));
- }
+ }
}
}
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity587TestCase.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity587TestCase.java
index 00af1d36..7d5da4c2 100755
--- a/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity587TestCase.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity587TestCase.java
@@ -16,7 +16,7 @@ package org.apache.velocity.test.issues;
* "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.test.BaseTestCase;
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity614TestCase.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity614TestCase.java
index 847c72f6..746b40a6 100755
--- a/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity614TestCase.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity614TestCase.java
@@ -16,7 +16,7 @@ package org.apache.velocity.test.issues;
* "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.ParseErrorException;
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity615TestCase.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity615TestCase.java
index b3731708..b58b508b 100755
--- a/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity615TestCase.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity615TestCase.java
@@ -16,7 +16,7 @@ package org.apache.velocity.test.issues;
* "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.test.BaseTestCase;
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity616TestCase.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity616TestCase.java
index 41ecabd2..9c801762 100755
--- a/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity616TestCase.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity616TestCase.java
@@ -16,7 +16,7 @@ package org.apache.velocity.test.issues;
* "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.test.BaseTestCase;
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity625TestCase.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity625TestCase.java
index 06a5fb1d..bdbf43fe 100755
--- a/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity625TestCase.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity625TestCase.java
@@ -16,7 +16,7 @@ package org.apache.velocity.test.issues;
* "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.test.BaseTestCase;
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity627TestCase.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity627TestCase.java
index 27cba83d..cce590fd 100644
--- a/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity627TestCase.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity627TestCase.java
@@ -16,7 +16,7 @@ package org.apache.velocity.test.issues;
* "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.RuntimeConstants;
@@ -33,13 +33,13 @@ public class Velocity627TestCase extends BaseTestCase
{
super(name);
}
-
+
public void setUp() throws Exception
{
super.setUp();
engine.setProperty(RuntimeConstants.SKIP_INVALID_ITERATOR, Boolean.FALSE);
}
-
+
public void test627()
{
// Make sure the error ouput contains "line 3, column 16"
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity629TestCase.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity629TestCase.java
index c944f41e..aa9132cf 100644
--- a/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity629TestCase.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity629TestCase.java
@@ -16,7 +16,7 @@ package org.apache.velocity.test.issues;
* "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.test.BaseTestCase;
@@ -31,7 +31,7 @@ public class Velocity629TestCase extends BaseTestCase
{
super(name);
}
-
+
public void test629()
{
String template = "##\n"+
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity62TestCase.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity62TestCase.java
index d1af9f83..f39af085 100755
--- a/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity62TestCase.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity62TestCase.java
@@ -16,7 +16,7 @@ package org.apache.velocity.test.issues;
* "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.test.BaseTestCase;
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity631TestCase.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity631TestCase.java
index 59ccad88..3b8b8281 100755
--- a/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity631TestCase.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity631TestCase.java
@@ -16,7 +16,7 @@ package org.apache.velocity.test.issues;
* "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.test.BaseTestCase;
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity667TestCase.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity667TestCase.java
index 328f4e51..9f49d4da 100644
--- a/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity667TestCase.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity667TestCase.java
@@ -16,7 +16,7 @@ package org.apache.velocity.test.issues;
* "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.test.BaseTestCase;
@@ -30,7 +30,7 @@ public class Velocity667TestCase extends BaseTestCase
{
super(name);
}
-
+
public void test667()
{
assertEvalExceptionAt("#macro", 1, 6);
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity682TestCase.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity682TestCase.java
index 0ef39059..8808ac3d 100644
--- a/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity682TestCase.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity682TestCase.java
@@ -16,14 +16,14 @@ package org.apache.velocity.test.issues;
* "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.RuntimeConstants;
import org.apache.velocity.test.BaseTestCase;
/**
- * This class tests VELOCITY-682.
+ * This class tests VELOCITY-682.
*/
public class Velocity682TestCase extends BaseTestCase
{
@@ -32,10 +32,10 @@ public class Velocity682TestCase extends BaseTestCase
super(name);
//DEBUG = true;
}
-
+
public void test682()
{
- engine.setProperty(RuntimeConstants.VM_PERM_INLINE_LOCAL, Boolean.TRUE);
+ engine.setProperty(RuntimeConstants.VM_PERM_INLINE_LOCAL, Boolean.TRUE);
assertEvalEquals("foo1foo2", "#macro(eval $e)#evaluate($e)#end#eval('foo1')#eval('foo2')");
}
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity689TestCase.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity689TestCase.java
index 8bfe6771..07f38b5a 100755
--- a/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity689TestCase.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity689TestCase.java
@@ -16,7 +16,7 @@ package org.apache.velocity.test.issues;
* "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.VelocityContext;
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity701TestCase.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity701TestCase.java
index e2193164..a5180157 100755
--- a/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity701TestCase.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity701TestCase.java
@@ -16,7 +16,7 @@ package org.apache.velocity.test.issues;
* "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.test.BaseTestCase;
@@ -43,9 +43,9 @@ public class Velocity701TestCase extends BaseTestCase
}
public static abstract class Foo {
-
+
public abstract String getBar();
-
+
}
public void testEnum()
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity702TestCase.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity702TestCase.java
index 66f80fae..21e8ed86 100755
--- a/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity702TestCase.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity702TestCase.java
@@ -16,7 +16,7 @@ package org.apache.velocity.test.issues;
* "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.VelocityEngine;
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity709TestCase.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity709TestCase.java
index 98893972..50219726 100644
--- a/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity709TestCase.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity709TestCase.java
@@ -16,7 +16,7 @@ package org.apache.velocity.test.issues;
* "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.test.BaseTestCase;
@@ -39,13 +39,13 @@ public class Velocity709TestCase extends BaseTestCase
System.out.println(template);
assertEvalEquals("\\", template);
}
-
+
public void testEscapedDoubleQuote()
{
String template = "#set($foo = \"jeah \"\"baby\"\" jeah! \"\"\"\"\")$foo";
assertEvalEquals("jeah \"baby\" jeah! \"\"", template);
}
-
+
public void testEscapedSingleQuote()
{
String template = "#set($foo = 'jeah ''baby'' jeah!')$foo";
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity727TestCase.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity727TestCase.java
index 1ed642db..46038152 100644
--- a/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity727TestCase.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity727TestCase.java
@@ -16,7 +16,7 @@ package org.apache.velocity.test.issues;
* "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.VelocityException;
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity728TestCase.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity728TestCase.java
index d3f347f7..824576d8 100644
--- a/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity728TestCase.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity728TestCase.java
@@ -16,7 +16,7 @@ package org.apache.velocity.test.issues;
* "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.VelocityException;
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity729TestCase.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity729TestCase.java
index 501b5b47..869c609f 100644
--- a/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity729TestCase.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity729TestCase.java
@@ -16,7 +16,7 @@ package org.apache.velocity.test.issues;
* "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.test.BaseTestCase;
@@ -41,6 +41,6 @@ public class Velocity729TestCase extends BaseTestCase
public void testVelocity754jQueryPost()
{
- assertSchmoo("$.post(\"someUrl\", \"\")");
+ assertSchmoo("$.post(\"someUrl\", \"\")");
}
}
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity736TestCase.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity736TestCase.java
index 1cd770c7..0a62dce3 100644
--- a/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity736TestCase.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity736TestCase.java
@@ -16,7 +16,7 @@ package org.apache.velocity.test.issues;
* "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.test.BaseTestCase;
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity742TestCase.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity742TestCase.java
index d96dff58..fe3034ec 100644
--- a/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity742TestCase.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity742TestCase.java
@@ -16,7 +16,7 @@ package org.apache.velocity.test.issues;
* "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.VelocityEngine;
@@ -32,7 +32,7 @@ public class Velocity742TestCase extends BaseTestCase
{
super(name);
}
-
+
protected void setUpEngine(VelocityEngine engine)
{
// we need to call init here because otherwise it is not called until assertEvalEquals
@@ -43,11 +43,11 @@ public class Velocity742TestCase extends BaseTestCase
public void testDisableAndRestoreDirective()
{
String s = "#include('doesnotexist.vm') directive is disabled";
-
+
// first remove the #include directive and see that is treated as normal text
engine.removeDirective("include");
assertEvalEquals(s, s);
-
+
// now reload the directive and see that the include directive works again and
// Velocity throws ResourceNotFoundException because it can't find the template
engine.loadDirective("org.apache.velocity.runtime.directive.Include");
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity747TestCase.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity747TestCase.java
index 81483ce4..520c8ab4 100644
--- a/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity747TestCase.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity747TestCase.java
@@ -16,7 +16,7 @@ package org.apache.velocity.test.issues;
* "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.VelocityContext;
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity753TestCase.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity753TestCase.java
index 3e0d4f70..d043a769 100755
--- a/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity753TestCase.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity753TestCase.java
@@ -16,7 +16,7 @@ package org.apache.velocity.test.issues;
* "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.test.BaseTestCase;
@@ -32,19 +32,19 @@ public class Velocity753TestCase extends BaseTestCase
}
public void testFloatArg() throws Exception
- {
- // verify precedence outside of Velocity
- Tool tool = new Tool();
- Float f = new Float(5.23);
- assertEquals("object", tool.test(f));
+ {
+ // verify precedence outside of Velocity
+ Tool tool = new Tool();
+ Float f = new Float(5.23);
+ assertEquals("object", tool.test(f));
- context.put("tool", tool);
- context.put("float", f);
+ context.put("tool", tool);
+ context.put("float", f);
- String template = "$tool.test($float)";
+ String template = "$tool.test($float)";
// in reflection-land, Float and float are equivalent, so double is selected
- assertEvalEquals("double", template);
- }
+ assertEvalEquals("double", template);
+ }
public static class Tool
{
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity755TestCase.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity755TestCase.java
index b45cde29..c3261da4 100755
--- a/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity755TestCase.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity755TestCase.java
@@ -16,7 +16,7 @@ package org.apache.velocity.test.issues;
* "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.test.BaseTestCase;
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity758TestCase.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity758TestCase.java
index 100d1755..12c48f6c 100644
--- a/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity758TestCase.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity758TestCase.java
@@ -16,7 +16,7 @@ package org.apache.velocity.test.issues;
* "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.EventCartridge;
@@ -43,7 +43,7 @@ public class Velocity758TestCase extends BaseTestCase
{
String nullContent = "Parse arg was null";
addTemplate("null.vm", nullContent);
-
+
EventCartridge ec = new EventCartridge();
ec.addEventHandler(new Handler());
ec.attachToContext(context);
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity762TestCase.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity762TestCase.java
index 1970a6ac..ea025ef3 100755
--- a/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity762TestCase.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity762TestCase.java
@@ -16,7 +16,7 @@ package org.apache.velocity.test.issues;
* "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.test.BaseTestCase;
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity785TestCase.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity785TestCase.java
index 3b04261f..83a60a09 100644
--- a/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity785TestCase.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity785TestCase.java
@@ -16,7 +16,7 @@ package org.apache.velocity.test.issues;
* "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.test.BaseTestCase;
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity830TestCase.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity830TestCase.java
index b77b7431..4f014f4c 100644
--- a/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity830TestCase.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity830TestCase.java
@@ -16,7 +16,7 @@ package org.apache.velocity.test.issues;
* "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.VelocityContext;
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/misc/ExceptionGeneratingDirective.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/misc/ExceptionGeneratingDirective.java
index 8c5b0bd8..5d68d244 100644
--- a/velocity-engine-core/src/test/java/org/apache/velocity/test/misc/ExceptionGeneratingDirective.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/misc/ExceptionGeneratingDirective.java
@@ -16,7 +16,7 @@ package org.apache.velocity.test.misc;
* "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;
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/misc/ExceptionGeneratingEventHandler.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/misc/ExceptionGeneratingEventHandler.java
index 5fc8c122..9353d85f 100644
--- a/velocity-engine-core/src/test/java/org/apache/velocity/test/misc/ExceptionGeneratingEventHandler.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/misc/ExceptionGeneratingEventHandler.java
@@ -16,7 +16,7 @@ package org.apache.velocity.test.misc;
* "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.IncludeEventHandler;
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/misc/ExceptionGeneratingResourceLoader.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/misc/ExceptionGeneratingResourceLoader.java
index a9e04e03..b5d0e975 100644
--- a/velocity-engine-core/src/test/java/org/apache/velocity/test/misc/ExceptionGeneratingResourceLoader.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/misc/ExceptionGeneratingResourceLoader.java
@@ -16,7 +16,7 @@ package org.apache.velocity.test.misc;
* "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.ResourceNotFoundException;
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/misc/GetPutObject.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/misc/GetPutObject.java
index 034a4f1d..1cc528c2 100644
--- a/velocity-engine-core/src/test/java/org/apache/velocity/test/misc/GetPutObject.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/misc/GetPutObject.java
@@ -16,7 +16,7 @@ package org.apache.velocity.test.misc;
* "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.
*/
public class GetPutObject
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/misc/TestContext.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/misc/TestContext.java
index 4db0812e..a2b189db 100644
--- a/velocity-engine-core/src/test/java/org/apache/velocity/test/misc/TestContext.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/misc/TestContext.java
@@ -16,7 +16,7 @@ package org.apache.velocity.test.misc;
* "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.VelocityContext;
@@ -27,8 +27,8 @@ import java.util.Map;
/**
* Used for testing EvaluateContext. For testing purposes, this is a case insensitive
- * context.
- *
+ * context.
+ *
* @author <a href="mailto:wglass@forio.com">Will Glass-Husain</a>
* @version $Id$
*/
@@ -36,7 +36,7 @@ public class TestContext implements Context
{
Context innerContext = new VelocityContext();
Map<String, String> originalKeys = new HashMap<String, String>();
-
+
public boolean containsKey(String key)
{
return innerContext.containsKey(normalizeKey(key));
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/misc/TestLogger.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/misc/TestLogger.java
index e0c45281..e54f76e4 100644
--- a/velocity-engine-core/src/test/java/org/apache/velocity/test/misc/TestLogger.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/misc/TestLogger.java
@@ -16,7 +16,7 @@ package org.apache.velocity.test.misc;
* "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.slf4j.helpers.FormattingTuple;
@@ -65,7 +65,7 @@ public class TestLogger extends MarkerIgnoringBase
startCapture();
}
}
-
+
public static final int LOG_LEVEL_TRACE = LocationAwareLogger.TRACE_INT;
public static final int LOG_LEVEL_DEBUG = LocationAwareLogger.DEBUG_INT;
public static final int LOG_LEVEL_INFO = LocationAwareLogger.INFO_INT;
@@ -133,7 +133,7 @@ public class TestLogger extends MarkerIgnoringBase
{
return !suppress && level >= enabledLevel;
}
-
+
/**
* Return the captured log messages to date.
* @return log messages
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/misc/UberspectTestException.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/misc/UberspectTestException.java
index 0235d96c..f41fc6d7 100644
--- a/velocity-engine-core/src/test/java/org/apache/velocity/test/misc/UberspectTestException.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/misc/UberspectTestException.java
@@ -16,7 +16,7 @@ package org.apache.velocity.test.misc;
* "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.util.introspection.Info;
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/misc/UberspectTestImpl.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/misc/UberspectTestImpl.java
index 57b114d8..0bdb6baa 100644
--- a/velocity-engine-core/src/test/java/org/apache/velocity/test/misc/UberspectTestImpl.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/misc/UberspectTestImpl.java
@@ -16,7 +16,7 @@ package org.apache.velocity.test.misc;
* "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.util.introspection.Info;
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/misc/UberspectorTestObject.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/misc/UberspectorTestObject.java
index fea2f1ce..34b9cbe0 100644
--- a/velocity-engine-core/src/test/java/org/apache/velocity/test/misc/UberspectorTestObject.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/misc/UberspectorTestObject.java
@@ -16,7 +16,7 @@ package org.apache.velocity.test.misc;
* "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.util.Map;
@@ -32,7 +32,7 @@ public class UberspectorTestObject
private String ambigous;
private String unambiguous;
-
+
/**
* @return the premium
*/
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/provider/BoolObj.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/provider/BoolObj.java
index d0fadf2f..0e90299b 100644
--- a/velocity-engine-core/src/test/java/org/apache/velocity/test/provider/BoolObj.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/provider/BoolObj.java
@@ -16,7 +16,7 @@ package org.apache.velocity.test.provider;
* "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.
*/
/**
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/provider/Child.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/provider/Child.java
index 7a42a123..d6b30e3a 100644
--- a/velocity-engine-core/src/test/java/org/apache/velocity/test/provider/Child.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/provider/Child.java
@@ -16,7 +16,7 @@ package org.apache.velocity.test.provider;
* "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.
*/
/**
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/provider/ForeachMethodCallHelper.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/provider/ForeachMethodCallHelper.java
index c0e3b02d..042f8657 100644
--- a/velocity-engine-core/src/test/java/org/apache/velocity/test/provider/ForeachMethodCallHelper.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/provider/ForeachMethodCallHelper.java
@@ -16,7 +16,7 @@ package org.apache.velocity.test.provider;
* "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.
*/
/**
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/provider/NullToStringObject.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/provider/NullToStringObject.java
index f1d64fad..f30e81cb 100644
--- a/velocity-engine-core/src/test/java/org/apache/velocity/test/provider/NullToStringObject.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/provider/NullToStringObject.java
@@ -16,7 +16,7 @@ package org.apache.velocity.test.provider;
* "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.
*/
/**
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/provider/NumberMethods.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/provider/NumberMethods.java
index 47740da9..eb70fd9c 100644
--- a/velocity-engine-core/src/test/java/org/apache/velocity/test/provider/NumberMethods.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/provider/NumberMethods.java
@@ -16,7 +16,7 @@ package org.apache.velocity.test.provider;
* "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.math.BigDecimal;
@@ -68,8 +68,3 @@ public class NumberMethods
}
-
-
-
-
-
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/provider/Person.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/provider/Person.java
index 7faeebbd..239739d0 100644
--- a/velocity-engine-core/src/test/java/org/apache/velocity/test/provider/Person.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/provider/Person.java
@@ -16,7 +16,7 @@ package org.apache.velocity.test.provider;
* "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.
*/
/**
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/provider/TestNumber.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/provider/TestNumber.java
index c3335af6..e9d9a75e 100644
--- a/velocity-engine-core/src/test/java/org/apache/velocity/test/provider/TestNumber.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/provider/TestNumber.java
@@ -16,7 +16,7 @@ package org.apache.velocity.test.provider;
* "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.util.TemplateNumber;
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/provider/TestProvider.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/provider/TestProvider.java
index 277ba228..0a327d53 100644
--- a/velocity-engine-core/src/test/java/org/apache/velocity/test/provider/TestProvider.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/provider/TestProvider.java
@@ -16,7 +16,7 @@ package org.apache.velocity.test.provider;
* "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.util.ArrayList;
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/sql/BaseSQLTest.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/sql/BaseSQLTest.java
index ae7a0620..83ea7d35 100644
--- a/velocity-engine-core/src/test/java/org/apache/velocity/test/sql/BaseSQLTest.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/sql/BaseSQLTest.java
@@ -16,7 +16,7 @@ package org.apache.velocity.test.sql;
* "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.test.BaseTestCase;
@@ -49,7 +49,7 @@ public abstract class BaseSQLTest
hsqlDB = new HsqlDB("jdbc:hsqldb:.", path + "/create-db.sql");
}
}
-
+
public void executeSQL(String sql)
throws SQLException
{
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/sql/HsqlDataSource.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/sql/HsqlDataSource.java
index d1b38c2f..c036867b 100644
--- a/velocity-engine-core/src/test/java/org/apache/velocity/test/sql/HsqlDataSource.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/sql/HsqlDataSource.java
@@ -16,7 +16,7 @@ package org.apache.velocity.test.sql;
* "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.hsqldb.jdbcDriver;
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/util/introspection/ClassMapTestCase.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/util/introspection/ClassMapTestCase.java
index 0228952b..ddaa9456 100644
--- a/velocity-engine-core/src/test/java/org/apache/velocity/test/util/introspection/ClassMapTestCase.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/util/introspection/ClassMapTestCase.java
@@ -16,7 +16,7 @@ package org.apache.velocity.test.util.introspection;
* "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 junit.framework.Test;
@@ -50,7 +50,7 @@ public class ClassMapTestCase
Velocity.setProperty(Velocity.RUNTIME_LOG_INSTANCE, new TestLogger());
Velocity.init();
}
-
+
public void tearDown()
{
}
@@ -59,7 +59,7 @@ public class ClassMapTestCase
throws Exception
{
Logger log = Velocity.getLog();
-
+
ClassMap c = new ClassMap(TestClassMap.class, log);
assertNotNull(c.findMethod("setBoolean", new Object[] { Boolean.TRUE }));
assertNotNull(c.findMethod("setByte", new Object[] { new Byte((byte) 4)}));
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/util/introspection/ConversionHandlerTestCase.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/util/introspection/ConversionHandlerTestCase.java
index 1d107779..5fe423e7 100644
--- a/velocity-engine-core/src/test/java/org/apache/velocity/test/util/introspection/ConversionHandlerTestCase.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/util/introspection/ConversionHandlerTestCase.java
@@ -73,7 +73,7 @@ public class ConversionHandlerTestCase extends BaseTestCase
{
return new TestSuite(ConversionHandlerTestCase.class);
}
-
+
public void testConversionsWithoutHandler()
throws Exception
{
@@ -169,7 +169,7 @@ public class ConversionHandlerTestCase extends BaseTestCase
"-----Result-----\n"+ result +
"----Expected----\n"+ compare +
"----------------";
-
+
fail(msg);
}
}
@@ -195,7 +195,7 @@ public class ConversionHandlerTestCase extends BaseTestCase
ve.setProperty(RuntimeConstants.CONVERSION_HANDLER_CLASS, "none");
}
ve.init();
-
+
return ve;
}
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/view/TemplateNodeView.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/view/TemplateNodeView.java
index f7333014..2fcf411a 100644
--- a/velocity-engine-core/src/test/java/org/apache/velocity/test/view/TemplateNodeView.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/view/TemplateNodeView.java
@@ -16,7 +16,7 @@ package org.apache.velocity.test.view;
* "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;
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/util/SimplePoolTestCase.java b/velocity-engine-core/src/test/java/org/apache/velocity/util/SimplePoolTestCase.java
index 84809207..07abdb7f 100644
--- a/velocity-engine-core/src/test/java/org/apache/velocity/util/SimplePoolTestCase.java
+++ b/velocity-engine-core/src/test/java/org/apache/velocity/util/SimplePoolTestCase.java
@@ -16,7 +16,7 @@ package org.apache.velocity.util;
* "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 junit.framework.Test;
diff --git a/velocity-engine-examples/src/etc/README.txt b/velocity-engine-examples/src/etc/README.txt
index 6dc70417..a573ec34 100644
--- a/velocity-engine-examples/src/etc/README.txt
+++ b/velocity-engine-examples/src/etc/README.txt
@@ -27,7 +27,7 @@ Change to the /build directory in the Velocity distribution and then type:
This will invoke ant and tell it to build the examples for you.
-Finally, note that more examples of using Velocity can be found in the
+Finally, note that more examples of using Velocity can be found in the
Velocity-Tools subject. Of special note is the VelocityViewServlet,
a quick and easy way to build a web application that uses Velocity.
@@ -37,7 +37,7 @@ a quick and easy way to build a web application that uses Velocity.
Velocity Examples
=================
-app_example1
+app_example1
------------
This simple example shows how to use the Velocity Template Engine
in a standalone program. It should be pre-compiled for you. Run it using the example
@@ -45,7 +45,7 @@ template provided (example.vm):
./example.sh
-app_example2
+app_example2
------------
Another simple example showing how to use Velocity in a standalone
program. This examples uses the org.apache.velocity.util.Velocity application utility
@@ -58,26 +58,24 @@ context_example
--------------
This is a demonstration of 2 different context implementations :
- a context implementation that uses a database as the storage.
- Use the DBContextTest program to test. See the DBContextTest.java file for the
- db table info. Unsupported demonstration code. You may need to futz with
- it to get it to work in your environment. To run, use the dbcontexttest.sh
+ Use the DBContextTest program to test. See the DBContextTest.java file for the
+ db table info. Unsupported demonstration code. You may need to futz with
+ it to get it to work in your environment. To run, use the dbcontexttest.sh
script.
- a context implementation that uses a TreeMap for storage. Very simple.
xmlapp_example
--------------
-This is simple example that demonstrates direct access of XML data via
+This is simple example that demonstrates direct access of XML data via
Velocity templates, as well as Velocimacro recursion.
event_example
-------------
This is a more advanced example, and shows how to use the event handling
-features of Velocity. This is an advanced topic, so if you are just
+features of Velocity. This is an advanced topic, so if you are just
starting with Velocity, you can come back to it later.
Thanks for using Velocity!
- the Velocity team
-
-
diff --git a/velocity-engine-examples/src/etc/app_example1/README.txt b/velocity-engine-examples/src/etc/app_example1/README.txt
index a7ec3f8b..a122aa69 100644
--- a/velocity-engine-examples/src/etc/app_example1/README.txt
+++ b/velocity-engine-examples/src/etc/app_example1/README.txt
@@ -15,7 +15,7 @@ As always, the if you have any questions :
and then follow the links to join the lists.
-app_example1
+app_example1
------------
This simple example shows how to use the Velocity Template Engine
diff --git a/velocity-engine-examples/src/etc/app_example1/appendVELCP.bat b/velocity-engine-examples/src/etc/app_example1/appendVELCP.bat
index 2d4c9deb..6fb3c6e2 100644
--- a/velocity-engine-examples/src/etc/app_example1/appendVELCP.bat
+++ b/velocity-engine-examples/src/etc/app_example1/appendVELCP.bat
@@ -14,6 +14,6 @@ rem software distributed under the License is distributed on an
rem "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
rem KIND, either express or implied. See the License for the
rem specific language governing permissions and limitations
-rem under the License.
+rem under the License.
set VELCP=%VELCP%;%1
diff --git a/velocity-engine-examples/src/etc/app_example2/README.txt b/velocity-engine-examples/src/etc/app_example2/README.txt
index 9f2a921c..1abd0e92 100644
--- a/velocity-engine-examples/src/etc/app_example2/README.txt
+++ b/velocity-engine-examples/src/etc/app_example2/README.txt
@@ -15,12 +15,12 @@ As always, the if you have any questions :
and then follow the links to join the lists.
-app_example2
+app_example2
------------
Another simple example showing how to use Velocity in a standalone
program. This examples uses the org.apache.velocity.util.Velocity application utility
-class, which provides a few convenient methods for application programmers.
+class, which provides a few convenient methods for application programmers.
Please see the build instructions found in examples/README.txt
@@ -31,4 +31,3 @@ To run :
or
example2.bat
-
diff --git a/velocity-engine-examples/src/etc/app_example2/appendVELCP.bat b/velocity-engine-examples/src/etc/app_example2/appendVELCP.bat
index 2d4c9deb..6fb3c6e2 100644
--- a/velocity-engine-examples/src/etc/app_example2/appendVELCP.bat
+++ b/velocity-engine-examples/src/etc/app_example2/appendVELCP.bat
@@ -14,6 +14,6 @@ rem software distributed under the License is distributed on an
rem "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
rem KIND, either express or implied. See the License for the
rem specific language governing permissions and limitations
-rem under the License.
+rem under the License.
set VELCP=%VELCP%;%1
diff --git a/velocity-engine-examples/src/etc/context_example/README.txt b/velocity-engine-examples/src/etc/context_example/README.txt
index 70e1ae57..082d3f18 100644
--- a/velocity-engine-examples/src/etc/context_example/README.txt
+++ b/velocity-engine-examples/src/etc/context_example/README.txt
@@ -20,9 +20,9 @@ context_example
This is a demonstration of 2 different context implementations :
- a context implementation that uses a database as the storage.
- Use the DBContextTest program to test. See the DBContextTest.java file for the
- db table info. Unsupported demonstration code. You may need to futz with
- it to get it to work in your environment. To run, use the dbcontexttest.sh
+ Use the DBContextTest program to test. See the DBContextTest.java file for the
+ db table info. Unsupported demonstration code. You may need to futz with
+ it to get it to work in your environment. To run, use the dbcontexttest.sh
script.
- a context implementation that uses a TreeMap for storage. Very simple.
@@ -30,4 +30,3 @@ This is a demonstration of 2 different context implementations :
Thanks for using Velocity!
- the Velocity team
-
diff --git a/velocity-engine-examples/src/etc/xmlapp_example/README.txt b/velocity-engine-examples/src/etc/xmlapp_example/README.txt
index 4f6305df..cd7d7ac7 100644
--- a/velocity-engine-examples/src/etc/xmlapp_example/README.txt
+++ b/velocity-engine-examples/src/etc/xmlapp_example/README.txt
@@ -15,14 +15,14 @@ As always, the if you have any questions :
and then follow the links to join the lists.
-xmlapp_example
+xmlapp_example
--------------
Another simple example showing how to use Velocity in a standalone
-program. This example shows how to use Velocity to access XML data
+program. This example shows how to use Velocity to access XML data
directly from an XML input file within the template. It also
demonstrates velocimacro recursion.
- ./xmlapp_example.sh
-or
+ ./xmlapp_example.sh
+or
xmlapp_example.bat
diff --git a/velocity-engine-examples/src/etc/xmlapp_example/appendVELCP.bat b/velocity-engine-examples/src/etc/xmlapp_example/appendVELCP.bat
index 2d4c9deb..6fb3c6e2 100644
--- a/velocity-engine-examples/src/etc/xmlapp_example/appendVELCP.bat
+++ b/velocity-engine-examples/src/etc/xmlapp_example/appendVELCP.bat
@@ -14,6 +14,6 @@ rem software distributed under the License is distributed on an
rem "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
rem KIND, either express or implied. See the License for the
rem specific language governing permissions and limitations
-rem under the License.
+rem under the License.
set VELCP=%VELCP%;%1
diff --git a/velocity-engine-examples/src/main/java/org/apache/velocity/example/Example.java b/velocity-engine-examples/src/main/java/org/apache/velocity/example/Example.java
index 84b57ad1..e6e13324 100644
--- a/velocity-engine-examples/src/main/java/org/apache/velocity/example/Example.java
+++ b/velocity-engine-examples/src/main/java/org/apache/velocity/example/Example.java
@@ -15,7 +15,7 @@ package org.apache.velocity.example;
* "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.Velocity;
diff --git a/velocity-engine-examples/src/main/java/org/apache/velocity/example/XMLTest.java b/velocity-engine-examples/src/main/java/org/apache/velocity/example/XMLTest.java
index 6b464548..f26a15da 100644
--- a/velocity-engine-examples/src/main/java/org/apache/velocity/example/XMLTest.java
+++ b/velocity-engine-examples/src/main/java/org/apache/velocity/example/XMLTest.java
@@ -15,7 +15,7 @@ package org.apache.velocity.example;
* "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.BufferedWriter;
@@ -119,4 +119,3 @@ public class XMLTest
t = new XMLTest(args[0]);
}
}
-
diff --git a/velocity-engine-examples/src/main/resources/dbtest.vm b/velocity-engine-examples/src/main/resources/dbtest.vm
index 9b9f47bc..1ee3979e 100644
--- a/velocity-engine-examples/src/main/resources/dbtest.vm
+++ b/velocity-engine-examples/src/main/resources/dbtest.vm
@@ -13,7 +13,6 @@
## "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.
$string
$hashtable.Bar
-
diff --git a/velocity-engine-examples/src/main/resources/example.vm b/velocity-engine-examples/src/main/resources/example.vm
index e36bfce0..7b17de21 100644
--- a/velocity-engine-examples/src/main/resources/example.vm
+++ b/velocity-engine-examples/src/main/resources/example.vm
@@ -13,7 +13,7 @@
## "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.
#set( $this = "Velocity")
diff --git a/velocity-engine-examples/src/main/resources/example2.vm b/velocity-engine-examples/src/main/resources/example2.vm
index 532feaff..27738c13 100644
--- a/velocity-engine-examples/src/main/resources/example2.vm
+++ b/velocity-engine-examples/src/main/resources/example2.vm
@@ -13,5 +13,5 @@
## "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.
Hello from $name in the $project project.
diff --git a/velocity-engine-examples/src/main/resources/velocity.properties b/velocity-engine-examples/src/main/resources/velocity.properties
index e05a0c53..d4f683db 100644
--- a/velocity-engine-examples/src/main/resources/velocity.properties
+++ b/velocity-engine-examples/src/main/resources/velocity.properties
@@ -13,6 +13,5 @@
# "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.
runtime.log = velocity_example.log
-
diff --git a/velocity-engine-examples/src/main/resources/xml.vm b/velocity-engine-examples/src/main/resources/xml.vm
index 2e455514..366b79b1 100644
--- a/velocity-engine-examples/src/main/resources/xml.vm
+++ b/velocity-engine-examples/src/main/resources/xml.vm
@@ -13,7 +13,7 @@
## "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.
#macro ( recursive $e $indent )
#if( $e.getChildren().size() > 0 )
$indent <$e.getName()>
diff --git a/velocity-engine-scripting/src/main/java/org/apache/velocity/script/VelocityScriptEngine.java b/velocity-engine-scripting/src/main/java/org/apache/velocity/script/VelocityScriptEngine.java
index f2db513d..29a9a16e 100644
--- a/velocity-engine-scripting/src/main/java/org/apache/velocity/script/VelocityScriptEngine.java
+++ b/velocity-engine-scripting/src/main/java/org/apache/velocity/script/VelocityScriptEngine.java
@@ -1,24 +1,24 @@
package org.apache.velocity.script;
/*
- * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*
- * Redistribution and use in source and binary forms, with or without modification, are
- * permitted provided that the following conditions are met: Redistributions of source code
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met: Redistributions of source code
* must retain the above copyright notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright notice, this list of
- * conditions and the following disclaimer in the documentation and/or other materials
- * provided with the distribution. Neither the name of the Sun Microsystems nor the names of
- * is contributors may be used to endorse or promote products derived from this software
- * without specific prior written permission.
+ * Redistributions in binary form must reproduce the above copyright notice, this list of
+ * conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution. Neither the name of the Sun Microsystems nor the names of
+ * is contributors may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS
- * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
- * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+ * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
@@ -123,7 +123,7 @@ public class VelocityScriptEngine extends AbstractScriptEngine implements Compil
*/
public Object eval(String str, ScriptContext ctx)
throws ScriptException
- {
+ {
return eval(new StringReader(str), ctx);
}
@@ -138,7 +138,7 @@ public class VelocityScriptEngine extends AbstractScriptEngine implements Compil
*/
public Object eval(Reader reader, ScriptContext ctx)
throws ScriptException
- {
+ {
initVelocityEngine(ctx);
String fileName = getFilename(ctx);
VelocityContext vctx = getVelocityContext(ctx);
@@ -229,7 +229,7 @@ public class VelocityScriptEngine extends AbstractScriptEngine implements Compil
protected static VelocityContext getVelocityContext(ScriptContext ctx)
{
ctx.setAttribute("context", ctx, ScriptContext.ENGINE_SCOPE);
- Bindings globalScope = ctx.getBindings(ScriptContext.GLOBAL_SCOPE);
+ Bindings globalScope = ctx.getBindings(ScriptContext.GLOBAL_SCOPE);
Bindings engineScope = ctx.getBindings(ScriptContext.ENGINE_SCOPE);
if (globalScope != null)
{
@@ -267,14 +267,14 @@ public class VelocityScriptEngine extends AbstractScriptEngine implements Compil
Properties p = new Properties();
p.load(new FileInputStream(propsFile));
return p;
- }
+ }
}
}
}
catch (Exception exp)
{
System.err.println(exp);
- }
+ }
return null;
}
diff --git a/velocity-engine-scripting/src/main/java/org/apache/velocity/script/VelocityScriptEngineFactory.java b/velocity-engine-scripting/src/main/java/org/apache/velocity/script/VelocityScriptEngineFactory.java
index f51f1fd2..c5b6f9b0 100644
--- a/velocity-engine-scripting/src/main/java/org/apache/velocity/script/VelocityScriptEngineFactory.java
+++ b/velocity-engine-scripting/src/main/java/org/apache/velocity/script/VelocityScriptEngineFactory.java
@@ -1,24 +1,24 @@
package org.apache.velocity.script;
/*
- * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*
- * Redistribution and use in source and binary forms, with or without modification, are
- * permitted provided that the following conditions are met: Redistributions of source code
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met: Redistributions of source code
* must retain the above copyright notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright notice, this list of
- * conditions and the following disclaimer in the documentation and/or other materials
- * provided with the distribution. Neither the name of the Sun Microsystems nor the names of
- * is contributors may be used to endorse or promote products derived from this software
- * without specific prior written permission.
+ * Redistributions in binary form must reproduce the above copyright notice, this list of
+ * conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution. Neither the name of the Sun Microsystems nor the names of
+ * is contributors may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS
- * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
- * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+ * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
@@ -52,7 +52,7 @@ public class VelocityScriptEngineFactory implements ScriptEngineFactory
private static List<String> mimeTypes;
private static Properties parameters;
-
+
static
{
names = new ArrayList();
@@ -81,7 +81,7 @@ public class VelocityScriptEngineFactory implements ScriptEngineFactory
* @return engine name, aka "Velocity"
*/
public String getEngineName()
- {
+ {
return VELOCITY_NAME;
}
@@ -145,7 +145,7 @@ public class VelocityScriptEngineFactory implements ScriptEngineFactory
buf.append(", ");
}
buf.append("$" + args[i]);
- }
+ }
buf.append(")}");
return buf.toString();
}
diff --git a/velocity-engine-scripting/src/test/java/org/apache/velocity/script/test/ScriptEngineTest.java b/velocity-engine-scripting/src/test/java/org/apache/velocity/script/test/ScriptEngineTest.java
index afe07847..e13398b2 100644
--- a/velocity-engine-scripting/src/test/java/org/apache/velocity/script/test/ScriptEngineTest.java
+++ b/velocity-engine-scripting/src/test/java/org/apache/velocity/script/test/ScriptEngineTest.java
@@ -94,5 +94,5 @@ public class ScriptEngineTest extends AbstractScriptTest {
String result = engine.eval(script).toString();
assertEquals("javax.script.SimpleScriptContext java.io.StringWriter java.io.InputStreamReader java.io.PrintWriter", result);
}
-
+
}
diff --git a/velocity-engine-scripting/src/test/resources/velocity.properties b/velocity-engine-scripting/src/test/resources/velocity.properties
index e05a0c53..d4f683db 100644
--- a/velocity-engine-scripting/src/test/resources/velocity.properties
+++ b/velocity-engine-scripting/src/test/resources/velocity.properties
@@ -13,6 +13,5 @@
# "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.
runtime.log = velocity_example.log
-