[ 
https://issues.apache.org/jira/browse/VELOCITY-843?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Claude Brisson resolved VELOCITY-843.
-------------------------------------
       Resolution: Fixed
         Assignee: Claude Brisson
    Fix Version/s: 2.x

not sure it's a major issue, since you have isEmpty(), but well, commited. 
Commit 1753755.

> Calling "empty" javabean method on automatically upgraded array
> ---------------------------------------------------------------
>
>                 Key: VELOCITY-843
>                 URL: https://issues.apache.org/jira/browse/VELOCITY-843
>             Project: Velocity
>          Issue Type: Bug
>          Components: Engine
>    Affects Versions: 1.7
>            Reporter: Krzysztof Krason
>            Assignee: Claude Brisson
>             Fix For: 2.x
>
>
> Velocity has a feature that allows calling List methods on arrays.
> I tried doing that on a String array.
> {noformat}
> #if ($data.viewOnlineLinkLocales.empty)
> Hello
> #end
> {noformat}
> "data" has a method:
> {noformat}
>     public List<String> getViewOnlineLinkLocales() {
>         String localeStr = getProperty(LOCALES);
>         if (localeStr == null) {
>             return new String[0];
>         }
>         return StringUtils..split(",");
>     }
> {noformat}
> When I try this for localeStr = null, the "empty" is returning false. On the 
> other hand when I replace it with "isEmpty()" it correctly returns true.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@velocity.apache.org
For additional commands, e-mail: dev-h...@velocity.apache.org

Reply via email to