You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by "Jean-Louis Boudart (JIRA)" <ji...@apache.org> on 2013/12/07 09:08:35 UTC
[jira] [Resolved] (EASYANT-58) "required" attribute of path
parameter is ignored
[ 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)