Changes Report

Release History


Release 1.5 - 2007-02-20

fix Fix to SecureUberspector to work properly with #foreach and iterators. Fixes VELOCITY-516. Thanks to Vincent Massol.wglass
addMake 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. Fixes VELOCITY-191. Thanks to Aki Nieminen.henning

Release 1.5-beta2 - 2006-11-24

addNew StringResourceLoader can retrieve templates from repository of in-memory Strings. Fixes VELOCITY-183. Thanks to Eelco Hillenius.henning
fixRuntimeInstance.getProperty now returns value set with RuntimeInstance.setProperty, even before initialization. Fixes VELOCITY-493. Thanks to Claude Brisson.wglass
addWhen macros have incorrect number of arguments, if property "velocimacro.arguments.strict" is set to true a ParseErrorException will be thrown. Fixes VELOCITY-435.wglass
addMethodInvocationException now contains line, column, template name allowing application to produce more useful error messages. Fixes VELOCITY-414. Thanks to Matthijs Lambooy.henning
fixFixed race condition in template retrieval that caused macros to fail under simultaneous load. Fixes VELOCITY-24.henning
addNew event handler InvalidReferenceHandler allows application to catch invalid references. Sample implementation collects them in list and optionally throws exception. Fixes VELOCITY-423.wglass
addNew, 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. Fixes VELOCITY-179.wglass
fixRemoved Serializable from InternalContextBase, because one of the members is not serializable anyway so this never worked (Found by Findbugs). Fixes VELOCITY-458.henning
fixAdd an additional pair of Executors that are smart about Map. Fixes VELOCITY-449. Thanks to Alexey Panchenko.henning
fixMethod caching now uses consistent keys. Fixes VELOCITY-453. Thanks to Alexey Panchenko.wglass
fixChange the meaning of localscope for macros to allow access to references from calling context. Fixes VELOCITY-459. Thanks to Stephen Haberman.wglass
addAdd a test for the DataSourceResource Loader.henning
addFix a problem in the DataSourceResource Loader, removing a potential security issue with SQL injection.henning
addBuild now creates the MD5 and SHA1 checksums for archives and jars.henning
fixFix a number of issues reported by running FindBugs on the Velocity source.henning

Release 1.5-beta1 - 2006-09-13

fixStop references from calling object.toString() twice. Fixes VELOCITY-438. Thanks to Stephen Haberman.wglass
updatePass 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. Fixes VELOCITY-429.wglass
fixWhen #include was followed by #parse with the same file name, a ClassCastException was thrown. Fixes VELOCITY-98. Thanks to Michal Chmielewski.wglass
addWrapped exceptions now have Cause property set on JDK 1.4. (note that Velocity continues to run under JDK 1.3). Fixes VELOCITY-425. Thanks to Llewellyn Falco.wglass
fixWhen Velocity is initialized, stream was not being closed. This made it difficult to undeploy webapps on Windows with Velocity unpacked. Fixes VELOCITY-418. Thanks to Jason Weinstein.wglass
fixUpgraded to latest commons collection, fixing problem with non-recognition of configuration file encoding in rare circumstances. Fixes VELOCITY-151. Thanks to Kirk Wolf.wglass
fixThe Introspector could throw a NPE when a parameter to an overloaded method was null. Fixes VELOCITY-370. Thanks to Reggie Riser.wglass
fixIf toString() returned null in a silent reference then "null" was displayed. Fixes VELOCITY-381. Thanks to Llwellyn Falco and Dan Powell.wglass
fixFixed bug in which empty body for #if (e.g. #if(some expression)#end caused ParseException. Fixes VELOCITY-359.wglass
addAdded javacc task to build.xml simplifying modification process for editing syntax files. Fixes VELOCITY-222.wglass
fixVelocity Engine was throwing NPE when used without a call to init(). Now gives a more meaningful exception message. Fixes VELOCITY-374.wglass
updateFixed problem with Uberspect Info class being created incorrectly. Added template name to Info allowing better error reporting. Fixes VELOCITY-404. Thanks to Llewellyn Falco.wglass
updateNumerous improvements to the documentation. Reorganized table of contents, moved community content to the Wiki, added article on using Velocity in web applications.wglass
updateWhen 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. Fixes VELOCITY-350.wglass
fixVelocity would give error when last line of file was a ## comment. Fixes VELOCITY-272.wglass
updateAdded method to retrieve application attributes. Fixes VELOCITY-412. Thanks to Malcolm Edgar.wglass
updateVelocity 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. Fixes VELOCITY-196.wglass
update#set now sets references to null when required. For backwards compatibility this must be enabled by setting the configuration key directive.set.null.allowed to true. Thanks to Thomas Veith.wglass
addNew optional event handler that escapes all references. Regular expressions can be used to configure which references have HTML, JavaScript, SQL, or XML escaping.wglass
addNew optional event handler implementation that forces #parse / #include to stay in same directory as parent template. Fixes VELOCITY-154.wglass
addNew event handler to modify behavior of #parse / #include. Fixes VELOCITY-260.wglass
updateFileResourceLoader now accepts absolute path when configured to accept it. Fixes VELOCITY-144.wglass
fixString containing "##" was treated as unterminated String. Fixes VELOCITY-126.wglass
addSpruced up Geir's old URLResourceLoader and promoted it from the whiteboard to the main distribution. Fixes VELTOOLS-55. Thanks to Charles Harvey.nbubna
updateThrow Runtime exceptions from nodes up the chain. Fixes VELOCITY-424. Thanks to Malcom Edgar.henning
updateRevert 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. Fixes VELOCITY-426. Thanks to Malcom Edgar.henning
updateMade 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. Fixes VELOCITY-403.nbubna
removeRemoved all J2EE build tasks. Now automatically detects availability of javax.sql.Datasource (in JDK 1.4+) and builds DatasourceResourceLoader when allowed. Fixes VELOCITY-401.henning
addant build now downloads the required dependency jars from ibiblio.orghenning
updateUnified template name, line and column number reporting for ParserErrorException Fixes VELOCITY-373. Thanks to Malcolm Edgar.henning
removeDropped the non-functional Velocity compiler.henning
updateStarted separating out the JavaCC generated parts of the Velocity Parser. Not yet complete to avoid user visible changes. Scheduled to be completed for 2.0henning
addContributed a maven build for Velocityhenning
fixReworked the ant build to product only two jars: velocity.jar and velocity-dep.jar.henning
removeRemoved 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.henning
addAdded support for decimal numbers. Fixes VELOCITY-242. Thanks to Peter Romianowski.wglass
fixMethodInvocationException now consistently thrown (previously was hidden when in parameter to Velocimacro). Fixes VELOCITY-284. Thanks to Mike Rettig.wglass
fixFixed problem in which foreach loop would fail to call overloaded method. Fixes VELOCITY-109.wglass
fixRemoved ERROR level log message "Can't find 'VM_global_library.vm'". Fixes VELOCITY-86.wglass
fixAnakia now generates consistent line endings based on platform. Requires upgrade to JDom 1.0. Fixes VELOCITY-348.wglass
addAnakia can now be pre-loaded with custom context values from an optional XML file. Fixes VELOCITY-190. Thanks to Peter Ryan.wglass
addDirectives can now be delimited with curly braces, for example #if($condition)something#{else}otherthing#{end}. Fixes VELOCITY-43.wglass
fixNulls now handled appropriate within #foreach. Fixes VELOCITY-254. Thanks to Christopher Reck.wglass
fixUpgraded JavaCC to version 3.2, providing JDK 1.5 compatibility. (Older version used keyword 'enum' which is reserved in JDK 1.5). Fixes VELOCITY-324. Thanks to Shinobu Kuwai.wglass
updateDatasourceResourceLoader now allows injection of Datasource, allowing it to be used in Inversion of Control (IOC) frameworks. Fixes VELOCITY-267. Thanks to Matt Raible .wglass
fix#stop now works properly. Fixes VELOCITY-218.wglass
updateClasspathResourceLoader now searches ContextClassLoader for template. Fixes VELOCITY-196. Thanks to Charles Oliver Nutter.wglass
removeRemoved use of 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(). Fixes VELOCITY-164.dlr
addNew Map literal syntax. Fixes VELOCITY-152. Thanks to James Taylor.wglass
removeRemoved the long-deprecated Log4JLogSystem. Never fear, SimpleLog4JLogSystem remains.dlr
updateEnhanced the implementation of ResourceCacheImpl using Jakarta Commons Collections LRUMap class. The previous greedy implementation did not set an upper bound for the cache size, meaning that cached resources were never relinquished (a possible memory leak). You can continue to use that behavior by setting the resource.manager.cache.size for your cache to less than 1.dlr
updateTook 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. Thanks to Daniel Rall.geirm
removeDeprecated class in favor of the various format classes in the Velocity Tools library.wglass
removeDeprecated the org.apache.velocity.servlet.VelocityServlet class in favor of from the Velocity Tools library. Servlet interaction is more a core competency of the Velocity Tools package than of Velocity's core.dlr
fixFix to BaseTestCase as suggested by Will Glass-Husain to handle line endings Fixes VELOCITY-185. Thanks to wglass.geirm
updateParameterized cache and mod time control in TexenTask based on patch from Henning. Thanks to henning.
fixFix 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. Fixes VELOCITY-150. Thanks to wglass.geirm
fixSimplePool now removes elements from pool on a get(). NOTE : Previously, it left the reference to the object in the pool. Fixes VELOCITY-161. Thanks to wglass.geirm
fixFixes problem with single line comment embedded in a multi-line comment. Fixes VELOCITY-61. Thanks to wglass.geirm
fixChange for VELOCITY-221 and partial for VELOCITY-148, allowing newlines in directives. Fixes VELOCITY-221.geirm
updateChange to finish request VELOCITY-148, allowing '+' as a string concat. We'll have to see how the community likes it. Fixes VELOCITY-148.geirm
fixDidn't allow formal reference notation as first arg to foreach. Fixes VELOCITY-239.geirm
updateTo make using w/ XML easier allow alternative logical operators 'and', 'or', 'lt', 'gt', 'le', 'ge', 'eq', 'ne', 'not'.geirm
updateAllow newlines in strings.geirm
fixTiny fix to VelocityWriter to prevent a NPE if someone passes it a null Fixes VELOCITY-148.geirm
fixAnakia changes to accomodate finalization of JDOM API. In AnakiaJDOMFactory, AnakiaTask, and OutputWrappergeirm
updateAdded template, line and column info to MIEs thrown by ASTMethodgeirm