DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=27741>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=27741 in #foreach: if nulls are encountered last value is returned instead of null Summary: in #foreach: if nulls are encountered last value is returned instead of null Product: Velocity Version: 1.3.1-rc2 Platform: PC OS/Version: Linux Status: NEW Severity: Normal Priority: Other Component: Source AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] I put an object having a method that returns an array of Integers in the context with contents [100,100,NULL,NULL,...] Then looping over the contents using #foreach ($elt in $Object.List) $!elt #end ALL entries become 100 with output: 100 100 100 100 (...) instead of the expected 100 100 When converting all null objects to say new Integer(0) in the getList() body before returning the list, output becomes 100 100 0 0 0 0 0 Apparently null values are not treated as first citizens, Cheers, Indra --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
