You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Dennis Lundberg (JIRA)" <ji...@codehaus.org> on 2008/02/02 18:35:57 UTC

[jira] Commented: (MCHANGES-97) Fix VTL errors

    [ http://jira.codehaus.org/browse/MCHANGES-97?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_122138 ] 

Dennis Lundberg commented on MCHANGES-97:
-----------------------------------------

I am unable to reproduce this error. Could you provide a minimal project that exploits this bug?

> Fix VTL errors
> --------------
>
>                 Key: MCHANGES-97
>                 URL: http://jira.codehaus.org/browse/MCHANGES-97
>             Project: Maven 2.x Changes Plugin
>          Issue Type: Improvement
>          Components: announcement
>    Affects Versions: 2.0-beta-3
>            Reporter: Benjamin Bentmann
>            Priority: Trivial
>         Attachments: changes.xml, vtl-errors.patch
>
>
> When calling {{mvn changes:announcement-generate}} for the attached {{changes.xml}} VTL errors are logged due to the various null fields in the {{Action}} bean:
> {noformat}
> [INFO] [changes:announcement-generate]
> [INFO] Creating announcement file from changes.xml...
> [ERROR] RHS of #set statement is null. Context will not be modified. org/apache/maven/plugin/announcement/announcement.vm [line 30, column 1]
> [ERROR] RHS of #set statement is null. Context will not be modified. org/apache/maven/plugin/announcement/announcement.vm [line 31, column 1]
> [ERROR] Left side ($!issue) of '!=' operation has null value. Operation not possible. org/apache/maven/plugin/announcement/announcement.vm [line 32, column 27]
> [ERROR] Left side ($!dueto) of '!=' operation has null value. Operation not possible. org/apache/maven/plugin/announcement/announcement.vm [line 32, column 65]
> [ERROR] RHS of #set statement is null. Context will not be modified. org/apache/maven/plugin/announcement/announcement.vm [line 43, column 1]
> [ERROR] RHS of #set statement is null. Context will not be modified. org/apache/maven/plugin/announcement/announcement.vm [line 44, column 1]
> [ERROR] RHS of #set statement is null. Context will not be modified. org/apache/maven/plugin/announcement/announcement.vm [line 56, column 1]
> [ERROR] RHS of #set statement is null. Context will not be modified. org/apache/maven/plugin/announcement/announcement.vm [line 57, column 1]
> [ERROR] RHS of #set statement is null. Context will not be modified. org/apache/maven/plugin/announcement/announcement.vm [line 69, column 1]
> [ERROR] RHS of #set statement is null. Context will not be modified. org/apache/maven/plugin/announcement/announcement.vm [line 70, column 1]
> [INFO] File created...
> {noformat}
> The attached patch goes the hard way and improves the VTL template to check for nulls. Easier would be to establish an invariant for the bean properties stating that they are never null but maybe empty, i.e. change all the setters to convert null into an empty string.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira