ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jean-Louis Boudart (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (EASYANT-58) "required" attribute of path parameter is ignored
Date Sat, 07 Dec 2013 08:08:35 GMT

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

Jean-Louis Boudart resolved EASYANT-58.
---------------------------------------

       Resolution: Fixed
    Fix Version/s: 0.10

Fixed on trunk thanks for reporting this

> "required" attribute of path parameter is ignored 
> --------------------------------------------------
>
>                 Key: EASYANT-58
>                 URL: https://issues.apache.org/jira/browse/EASYANT-58
>             Project: EasyAnt
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 0.9, 0.10
>            Reporter: Jérôme Leroux
>            Priority: Minor
>             Fix For: 0.10
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> When a path parameter is declared but not required, an error is raised if it is not defined.
> Example:
> {{<ea:parameter path="my.path" required="false" description="Simple path" />}}
> When calling easyant, the following error occurs: 
> {{reference 'my.path' must be a path}}
> Here is a fix to apply in execute() method of ParameterTask:
> Current code:
> {code:java}
> if (isRequired() && p == null) {
>     throw new BuildException(...);
> } else if (!(p instanceof Path)) {
>     throw new BuildException(...);
> }
> {code}
> Fix:
> {code:java}
> if (isRequired() && p == null) {
>      throw new BuildException(...);
> } else if (p != null && !(p instanceof Path)) {
>     throw new BuildException(...);
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Mime
View raw message