Changelog Fix parser bug (newline and space inside an empty inline map definition). Backported Spring framework Velocity Engine integration classes from Spring 4.x, in the new module spring-velocity-support. Let SecureUberspector block methods on ClassLoader and subclasses. Added Travis CI. Don't leak classes via Stop.STOP_ALL stack trace. Deprecated 2.1 flag velocimacro.arguments.preserve_literals in favor of the new valocimacro_enable_bc_mode flag, which will also, like 1.7 does, use global context values as defaults for missing macro arguments which do not have an explicit default value. Fixed regression: Macro arguments names cannot collide with external references names Fixed macro calls without parenthesis eating the following newline in BC mode Fixed bad cache handling for java.lang.Class methods Fixed parser regression when || follow a Velocity expression Added BigInteger and BigDecimal implicit conversions Fixed abnormal suppression of zero-width whitespaces Added an example of how to build a customized parser where the '#', '$', '*' and '@' can be replaced by any character Added the runtime.log.track_locations debugging flag (disabled by default), which:
  • display a VTL stack trace on any error
  • Implement template location tracking with slf4j MDC tags: Once activated, an MDC-aware logger will be able to display the file, line and column MDC tags
Added the following 1.7.x backward compatibility flags:
  • event_handler.invalid_references.quiet - warn on invalid quiet references
  • event_handler.invalid_references.null - warn on null references
  • event_handler.invalid_references.tested - warn on invalid references tested with #if()
Those three flags are false by default, but can be set to true to mimic 1.7.x behavior
Introspection: favor non-vararg methods on ambiguities as does the Java compiler Also allow hyphen in subproperties when the corresponding backward compatibility flag is on
Reorganization of configuration properties key names, for clarity and consistency, see the table of correspondance Rendering of arrays should display their content, as for lists Enhance space gobbling ("lines" mode): do not eat ending newline when directive doesn't start after a newline Fix unary negate Deprecate the Class to Class CoversionHandler in favor of a Class to Type TypeConversionHandler, which allows to specity converters towards generic types specializations. The minimum JDK is now 1.8 Rely on Locale.ROOT for lowercase/uppercase operations Added the velocimacro.preserve.arguments.literals flag (false by default), for backward compatibility. When true, for any macro argument that evaluates to null, the macro will display the provided argument literal representation instead of the literal argument reference Default block for empty loops: #foreach($i in []) loop block #else empty #end Include proper OSGi bundle informations in manifest files Alternate reference values: ${foo|'foo'} evaluates to false whenever boolean evaluation of $foo is false Fix parser regression in #macro whitespaces handling Added a new 'parser.allow_hypen_in_identifiers' boolean property (false per default) to (dis)allow '-' in reference identifiers Fix parsing of a terminal hash or dollar sign in sing litteral and template Implicit conversion to numbers in integer ranges Fix DataSourceResourceLoader for UTF-8 correct handling in VARCHAR/CLOB columns, and for connection / statement / result set life cycle Allow expressions inside []: $foo[$bar + 1] New strategy for reference boolean evaluation:
  1. return false for a null object
  2. return its value for a Boolean object, or the result of the getAsBoolean() method if it exists.
  3. if directive.if.emptycheck is false (true by default), stop here and return true.
  4. check for emptiness:
    • return whether an array is empty.
    • return whether isEmpty() is false (covers String and all Collection classes).
    • return whether length() is zero (covers CharSequence classes other than String).
    • returns whether size() is zero.
    • return whether a Number strictly equals zero.
  5. check for emptiness after explicit conversion methods:
    • return whether the result of getAsString() is empty (and false for a null result) if it exists.
    • return whether the result of getAsNumber() strictly equals zero (and false for a null result) if it exists.
Reviewed event handling API:
  • added a Context argument for all events
  • got rid of the Executor pattern ; event handlers are directly called by the cartridge
Removed references to ExtProperties from the engine configuration API. Default encoding is now UTF-8. 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:
  • directive, and velocity.directive.[directivename]
  • parser
  • loader and loader.[loadername]
  • macro
  • rendering
  • event
Get rid of UberspectLoggable interface.
Added unary negate math operator Add a configurable space gobbling feature, to control indentation in the generated code.
Possible values for the 'space.gobbling' configuration key:
  • none : no space gobbling at all
  • bc : Velocity 1.x backward compatible space gobbling
  • lines (the default) : gobbles whitespaces and endline from lines containing a single VTL directive
  • structured : like 'lines', but also fixes indentation in children text blocks
added a new pluggable ConversionHandler class which, by default, converts method arguments as needed between main basic Java data types (boolean, numbers and strings) added a runtime.string.interning option to trigger Java String interning on or off Applied Jarkko memory-saving patch which frees tokens while parsing. Macros now use a call by sharing convention. support $array.empty, as for $list.empty avoid useless string calculation in ASTStringLiteral nicified AST tree debug output fix parsing of $obj._method() loading default properties should not prepend '/' and should use classloader to get resource stream Allow conversion of method args from String to Enum constant Applied performance patch for MapGetExecutor: it's faster to directly use object instance rather than to inspect all public interfaces 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 MethodExceptionEventHandler now provide template location infos Attach macros to their defining template. Also fixes VELOCITY-776. Thanks to Simon Kitching for the multithreading testcase. have #foreach honnor the Closeable interface on the iterator Don't leave 'initializing' to true if a problem occurs during initialization. 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. Add a first implementation for the JSR 223 standard scripting interface. Fix Template default encoding initialization problem. The ResourceLoader API now provides a Reader rather than an InputStream. Also fixes VELOCITY-599. 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. Take advantage of the major version jump to enforce String keys in internal Context API Fix regression: #set<tab>left-paren no longer valid grammar Patch from Mike Kienenberger applied + added test switch to slf4j logging facade fix parser for '$map{key}' text rendering (StackOverflow 32805217) Vulnerability in dependency: commons-collections: 3.2.1 Exception displayed when trying to loop over an Iterable private class #foreach should work over any Iterable class Catch exceptions raised during chainable uberspector initialization Hypen is no more allowed in variable names Method arguments can now be expressions Parser generation from the .jjt file is now handled by Maven Add a public fields Uberspector Support query modification in DataSourceResourceLoader Add clear() to ResourceCache Make #if() return false for empty strings and empty collections Add SLF4J logging option Use Maven 2 as build system Fixed quotes escaping so that doubling single quotes only works when enclosing quotes are single quotes (and same behaviour for double quotes) Removed all remaining "throws Exception" clauses and the now useless ExceptionUtils class. Remove directive.if.tostring.nullcheck crutch with intent to replace testing of toString() null status with support for toBoolean() (or similar) method on objects being "#if'd". Remove directive.set.null.allowed and instead always allow null to be #set to references. This also means removing all NullSetEventHandler code, since it was only in play when nulls were not allowed to be #set. Remove features deprecated in 1.7 ($velocityCount, $velocityHasNext, velocimacro.context.localscope, directive.evaluate.context.class and all internal supporting code (ProxyVMContext, EvaluateContext, etc). Add ability to specify default values for macro parameters, e.g.; #macro(foo bar=1) Add ability to place line comments next to macro parameter definitions. Block directives no longer require parenthesis so #@foo #end is now allowed. Also, brackets now work with Block Macros so #{@foo}bar#end works. Removed all deprecations (Anakia, Texen, VelocityServlet, etc.) Changed macro arguments to be pass by value.
Fixed quotes escaping so that doubling single quotes only works when enclosing quotes are single quotes (and same behaviour for double quotes) Add access to template and directive debugging info via $/scope/.info. LogManager now catches UnsupportedOperationExceptions during LogChute init. Ensure that DataSourceResourceLoader closes PreparedStatements. Mark optional dependencies as such in OSGi bundle manifest. Add support for OSGi-ready manifests in build/release tasks. When comparing parameter types during method mapping, make Object always less specific than other types. Avoid NPEs in case of bad #foreach config. Use LinkedHashMap to maintain order of VTL-created maps. Treat \ as non-special in string literals, except when specifying unicode sequences. Allow escaping of quotes (single or double) within string literals by doubling them ("" or ''). Give #parse better log/exception messages and give IncludeEventHandler a chance to handle null #parse args. Fix $.x parsing failures (particularly helpful for jQuery users). Log Velocimacro additions at debug level, as in pre-1.6 versions. Add removeDirective(name) and loadDirective(classname) methods to allow runtime changes to the directive set. Throw an informative VelocityException when #define is given no parameter (instead of an ArrayIndexOutOfBoundsException). Throw an informative VelocityException when #parse is given no args (instead of an NPE). Changed #stop to a directive implementation (get it out of the parser) and allow it to accept a message as an argument to be written to the logs for debugging purposes. Change the scoping behavior of Velocity, keeping it optional (everything global scoped by default) but now providing an explicit namespace in content-containing directives (like macros, #foreach, #parse, etc.) in which references that should stay local may be kept. This is accompanied by numerous related changes, including: <ul> <li>A Scope reference can now be automatically made available within each content directive: <ul> <li>$template in Template.merge and #parse content<li> <li>$macro in #macro</li> <li>$foreach in #foreach</li> <li>$evaluate in #evaluate or Velocity.evaluate(...) content</li> <li>$define in #define</li> <li>$&lt;amacro&gt; in #@&lt;amacro&gt; (where &lt;amacro&gt; is the name of a macro being called with a body)</li> </ul> </li> <li>For performance and compatibility these are all off by default, *except* for $foreach. The others may be enabled by setting a velocity property like: <br/><code>macro.provide.scope.control = true</code></li> <li>When scopes of the same type are nested make the parent Scope available through the child (e.g. $foreach.parent or $foreach.topmost).</li> <li>When a Scope reference overrides an existing reference that is not a Scope, make it available through the Scope (e.g. $foreach.replaced).</li> <li>Made #break work in any of the above scopes to exit the most immediate one, unless a different scope is provided as an argument (e.g. #break($macro) or #break($foreach.topmost)).</li> <li>Deprecated $velocityCount; please use $foreach.count or $foreach.index.</li> <li>Deprecated $velocityHasNext; please use $foreach.hasNext, $foreach.first or $foreach.last</li> <li>Deprecated velocimacro.context.localscope setting; please get/set local #macro references as members of the provided $macro scope control instead. (e.g. #set( $macro.foo = 'bar' ) and $macro.foo ).</li> <li>Deprecated directive.evaluate.context.class setting; please get/set local #evaluate references as members of the provided $evaluate scope control instead. (e.g. #set( $evaluate.foo = 'bar' ) and $evaluate.foo ).</li> </ul> All of the deprecated features will be removed in Velocity 2.0. Calling #set on a macro argument (for which a #set-able reference was passed) will no longer propagate the new value to the original reference, but merely set the value of the macro argument reference. This was an obscure, infrequently used feature and was decided to be more problematic and unpredictable than useful. In strict mode attempts to render references that evaluate to null will throw an exception. In the user wishes to suppress the exception and render nothing then the reference can be preceeded with '$!' as in $!foo. The non default VelocityEngine construtors now do not initialize the runtime system so that properties may be set after construction. Also fixes an Initialization race condition. Make velocimacro.arguments.strict=true work with block macros. Added a property for changing escape behavior such that putting a forward 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. Fix StringIndexOutOfBoundsException caused by #[[##x]]# (line comment on same line as end of textblock). Fix NPE caused by #@foo (w/o #end) in template. Minor performance tweaks based on Findbugs findings Pre 1.6 behavior of specifying #macro without parenthesis would throw a VelocityException has been restored. $bodyContent#end #@bold()any valid VTL here#end) The $bodyContent reference may be renamed via a velocimacro.body.reference setting in your velocity.properties. ]]> Added #[[this is included in output but not parsed]]# syntax to replace and deprecate the much more limited #literal directive (which required parse-able content). Re-implement #stop so that it stops template execution and rendering. This Also addresses a performance bottleneck detected in the old implementation. #stop is a general use directive now, and not just for debugging. Reduce performance bottleneck with the referenceInsert event handler call Better error reporting when toString() throw an exception when testing an #if conditional. For example #if($foo) Added bracketed index syntax, $foo[0], or #set($foo[0] = 1) Removed java.lang.Exception from throws clause of Velocity and VelocityEngine API. Also removed IOException so that all method calls use unchecked exceptions. Removed obsolete WebMacro conversion tool and experimental Veltag (which has been replaced by VelocityViewTag from VelocityTools). Fix double-checked locking in RuntimeInstance's optional lazy-init. Fix 100% CPU loop hang under simultaneous HashMap calls in ClassMap due to classic bug in Sun's implementation. Now uses ConcurrentHashMap when available and Hashtable otherwise. Add directive.if.tostring.nullcheck config switch to match past performance for those who do not need to check whether $foo.toString() returns null when doing #if( $foo ). Fix obscure caching problem in multiple resource loader situations where resources may exist in more than one loader and appear and disappear from loaders. Fix old regression from 1.4 in supporting methods declared as abstract in a public class but implemented in a non-public class. Fix problem with FileResourceLoader's resourceExists() when configured w/multiple paths. Fix ClassMap introspection bug introduced in 1.5, where public super-interface methods implemented in protected or private classes were unreachable. Fix regression in proxying of macro argument #set calls. Note that in 1.7, calling #set on a macro argument (for which a #set-able reference was passed) will not propagate the new value to the original reference, but merely set the value of the macro argument reference. Fix loss of inline macros when #evaluate is used. Fix name of sources jar for maven deployment. Pre 1.6 behavior of specifying #macro without parenthesis would throw a VelocityException has been restored. Better error reporting when toString() throw an exception when testing an #if conditional. For example #if($foo) Fix $velocityHasNext so that it works in nested foreach blocks. Throw an exception in strict mode when >=, <=, < or > comparisons can't be made. Fix $velocityHasNext so it is not always true. Correct/enhance template name reporting for #include and #parse. Removed redundant error message in ASTReference. Fix limitation in new macro implementation that resisted #set calls to change references defined as arguments for the macro. Fix vararg bugs when calling overloaded methods like get(String,String,Object[]) and get(String,List). (e.g. in VelocityStruts' MessageTool) Fix NPE when null value is passed to array/vararg method. Track template name in Node, to get proper template name in the exception message when a reference in a macro causes that exception. Update Finnish and Spanish User Guide sections on division operation. Fix classpath for XMLApp example. Fix references to Oro dependency to make it clear that it is only necessary for certain reference event handlers. Remove old Anakia/Texen docs and examples. Fix bug in vararg support where an array passed to a vararg method was being wrapped in another array. Locked down versions for reporting plugins in Maven POM. Add Maven-Ant tasks for installing and deploying Maven artifacts, including previously missing source and javadoc jars (VELOCITY-554). Fix User Guide's Table of Contents anchor links. Fix parser bug that prevented references from immediately preceding #set directives. Revert change made for VELOCITY-285, as it broke pass-by-name nature of macro arguments. Fix line numbers in string literals. Fix line number for exceptions with body of #foreach directive. Log full macro stack when a RuntimeException occurs in a template. Format template and line/column numbers consistently in error and log messages. Don't override pre-configured log levels for JdkLogChute or Log4JLogChute. Add optional 'runtime.references.strict' property that has Velocity throw exceptions when it encounters undefined references or velocimacros in a template. Inlude Maven Ant tasks jar in downloads and add support for downloading from Maven2 repos. Fix problem with single backslash in interpolated (double-quoted) strings. Fix escaping of bracketed directives (e.g. \#{if}($foo)$bar\#{end}). Uberspectors chaining Add ability to set a connection timeout for URLResourceLoader. Make it easier to override ResourceFactory.getResource(...) in ResourceManagerImpl. Fix BooleanPropertyExecutor to recognize "public Boolean isFoo" properties. Add a separate resourceExists(String name) method to ResourceLoader(s) to improve performance. Fix missing # and $ characters within #literal() directive output. Add support for static utility classes: context.put("math", Math.class) -> $math.sin(0) Add #define directive set an unrendered block of VTL as a reference. (e.g. #define( $foo )Hello, $bar!#end #set( $bar = 'world') $foo -> Hello, world!) Add #break directive to exit #foreach loops early. Fixed major performance issues with Velocimacros. Removed many, various performance bottlenecks and concurrency issues. (Also see VELOCITY-595) New VTL syntax $velocityHasNext within #foreach loops Multi-line comments in macros were rendering extra *# when evaluated. Have VelocityCharStream use an exponential buffer expansion rate. Prevent exception due to simultaneous rendering of macros. New VTL syntax allows arrays to be treated like fixed length lists. Added support for varargs in method calls. Prevent NPE when template is parsed simultaneously by multiple users. (may apply only to macros). Users can now include libraries of macros with #parse in a template. Macro libraries can now be selected programatically when merging templates. Catch IllegalArgumentException when invoking method. Fixed parse error for map definitions ending with a reference. Add new property velocimacro.max.depth which limits max macro calling depth. Add ability to add directives programmatically Allow user directives to have no content. IncludeNotFound event handler was displaying "not found" template. Fix StringResourceLoader to make it possible to use more than one loader per VM. Make unicode encoding work in velocity templates. Add a ServletLogChute that allows logging through the servlet API. Ported from the Velocity Tools project. Add a CommonsLogLogChute that allows logging through commons-logging. Deprecate integrated texen and anakia, factor it out into separate jars. Added new directive #evaluate() to dynamically evaluate VTL. Fix to SecureUberspector to work properly with #foreach and iterators. Make FileResourceLoader unicode aware to allow skipping over BOM markers like those created by Windows Notepad. This is a workaround for a Java bug, where Java itself does not recognize the UTF-8 BOM as defined by the unicode standard. New StringResourceLoader can retrieve templates from repository of in-memory Strings. RuntimeInstance.getProperty now returns value set with RuntimeInstance.setProperty, even before initialization. When macros have incorrect number of arguments, if property "velocimacro.arguments.strict" is set to true a ParseErrorException will be thrown. MethodInvocationException now contains line, column, template name allowing application to produce more useful error messages. Fixed race condition in template retrieval that caused macros to fail under simultaneous load. New event handler InvalidReferenceHandler allows application to catch invalid references. Sample implementation collects them in list and optionally throws exception. New, optional SecureIntrospector prohibits methods that involve manipulation of classes, classloaders or reflection objects. Use this introspector to secure Velocity against a risk of template writers using reflection to perform malicious acts. Removed Serializable from InternalContextBase, because one of the members is not serializable anyway so this never worked (Found by Findbugs). Add an additional pair of Executors that are smart about Map. Method caching now uses consistent keys. Change the meaning of localscope for macros to allow access to references from calling context. Add a test for the DataSourceResource Loader. Fix a problem in the DataSourceResource Loader, removing a potential security issue with SQL injection. Build now creates the MD5 and SHA1 checksums for archives and jars. Fix a number of issues reported by running FindBugs on the Velocity source. Stop references from calling object.toString() twice. Pass through all runtime exceptions. Among other benefits, this allows plugins to throw a runtime exception to signify an application level problem in the calling application. When #include was followed by #parse with the same file name, a ClassCastException was thrown. Wrapped exceptions now have Cause property set on JDK 1.4. (note that Velocity continues to run under JDK 1.3). When Velocity is initialized, default.properties stream was not being closed. This made it difficult to undeploy webapps on Windows with Velocity unpacked. Upgraded to latest commons collection, fixing problem with non-recognition of configuration file encoding in rare circumstances. The Introspector could throw a NPE when a parameter to an overloaded method was null. If toString() returned null in a silent reference then "null" was displayed. #if(some expression)#end caused ParseException. ]]> Added javacc task to build.xml simplifying modification process for editing syntax files. Velocity Engine was throwing NPE when used without a call to init(). Now gives a more meaningful exception message. Fixed problem with Uberspect Info class being created incorrectly. Added template name to Info allowing better error reporting. Numerous improvements to the documentation. Reorganized table of contents, moved community content to the Wiki, added article on using Velocity in web applications. When testing objects in VTL for equality, if both objects are a number, use number equality. If both objects are the same class, use the equals method. New behavior: If objects are different classes, compare the String representation of both objects rather than logging an error. Velocity would give error when last line of file was a ## comment. Added method to retrieve application attributes. Velocity now searches in the current thread's context classloader before the system classloader for all templates loaded with the ClasspathResourceLoader and for all user-defined ResourceLoaders, introspectors, event handlers, etc. A typical use for this is to have Velocity in the application container classpath while keeping templates and plugins in the webapp classpath. directive.set.null.allowed to true. ]]> New optional event handler that escapes all references. Regular expressions can be used to configure which references have HTML, JavaScript, SQL, or XML escaping. New optional event handler implementation that forces #parse / #include to stay in same directory as parent template. New event handler to modify behavior of #parse / #include. FileResourceLoader now accepts absolute path when configured to accept it. String containing "##" was treated as unterminated String. Spruced up Geir's old URLResourceLoader and promoted it from the whiteboard to the main distribution. Throw Runtime exceptions from nodes up the chain. Revert the split between org.apache.velocity.runtime.parser.node.Node and org.apache.velocity.runtime.parser.Node. The parser now only uses ...parser.node.Node because this change broke custom directives. Made a lot of internal logging upgrades including: Deprecated LogSystem interface and replaced it (and all its implementations) with a new LogChute interface and implementations, added getLog() to RuntimeServices (and all its friends) to improve on and replace its now deprecated logging methods, added a JdkLogChute as a 3rd default option for those using JDK 1.4+, and added a StandardOutLogChute as final resort if other LogChute inits fail. See JIRA issues VELOCITY-403, VELOCITY-166, VELOCITY-403,VELOCITY-166,VELOCITY-78, VELOCITY-157, VELOCITY-159, VELOCITY-193. Removed all J2EE build tasks. Now automatically detects availability of javax.sql.Datasource (in JDK 1.4+) and builds DatasourceResourceLoader when allowed. ant build now downloads the required dependency jars from ibiblio.org Unified template name, line and column number reporting for ParserErrorException Dropped the non-functional Velocity compiler. Started separating out the JavaCC generated parts of the Velocity Parser. Not yet complete to avoid user visible changes. Scheduled to be completed for 2.0 Contributed a maven build for Velocity Reworked the ant build to product only two jars: velocity.jar and velocity-dep.jar. Removed the Configuration class and all methods that references it. This class was deprecated since Velocity 1.1 and was scheduled to be gone for Velocity 1.3 or 1.4. Now it was finally removed in 1.5. Added support for decimal numbers. MethodInvocationException now consistently thrown (previously was hidden when in parameter to Velocimacro). Fixed problem in which foreach loop would fail to call overloaded method. Removed ERROR level log message "Can't find 'VM_global_library.vm'". Anakia now generates consistent line endings based on platform. Requires upgrade to JDom 1.0. Anakia can now be pre-loaded with custom context values from an optional XML file. Directives can now be delimited with curly braces, for example #if($condition)something#{else}otherthing#{end}. Nulls now handled appropriate within #foreach. Upgraded JavaCC to version 3.2, providing JDK 1.5 compatibility. (Older version used keyword 'enum' which is reserved in JDK 1.5). DatasourceResourceLoader now allows injection of Datasource, allowing it to be used in Inversion of Control (IOC) frameworks. #stop now works properly. ClasspathResourceLoader now searches ContextClassLoader for template. Log4J's deprecated Category and Priority classes in favor of the corresponding and supported Logger and Level. To update, replace necessary references, and Category.getInstance() with Logger.getLogger(). ]]> New Map literal syntax. Removed the long-deprecated Log4JLogSystem. Never fear, SimpleLog4JLogSystem remains. resource.manager.cache.size for your cache to less than 1. ]]> Took dan's modified SimpleLog4jLogSystem, and renamed Log4JLogSystem, and put back old version of SimpleLog4JLogSystem, as deprecated. That way we can move forward with an up-to-date version that uses Logger, and for one release, be backwards compatile for the Category-using log4j crowd. Deprecated org.apache.velocity.tools.VelocityFormatter class in favor of the various format classes in the Velocity Tools library. Deprecated the org.apache.velocity.servlet.VelocityServlet class in favor of org.apache.velocity.tools.view.servlet.VelocityViewServlet from the Velocity Tools library. Servlet interaction is more a core competency of the Velocity Tools package than of Velocity's core. Fix to BaseTestCase as suggested by Will Glass-Husain to handle line endings Parameterized cache and mod time control in TexenTask based on patch from Henning. Fix to DatasourceResourceLoader - stop using the old Runtime singleton as would leak a little memory for each instance of VelocityEngine created. Hunted down by Will Glass-Husain. SimplePool now removes elements from pool on a get(). NOTE : Previously, it left the reference to the object in the pool. Fixes problem with single line comment embedded in a multi-line comment. Change for VELOCITY-221 and partial for VELOCITY-148, allowing newlines in directives. Change to finish request VELOCITY-148, allowing '+' as a string concat. We'll have to see how the community likes it. Didn't allow formal reference notation as first arg to foreach. To make using w/ XML easier allow alternative logical operators 'and', 'or', 'lt', 'gt', 'le', 'ge', 'eq', 'ne', 'not'. Allow newlines in strings. Tiny fix to VelocityWriter to prevent a NPE if someone passes it a null Anakia changes to accomodate finalization of JDOM API. In AnakiaJDOMFactory, AnakiaTask, and OutputWrapper Added template, line and column info to MIEs thrown by ASTMethod