You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by "Maarten Coene (JIRA)" <ji...@apache.org> on 2008/03/18 23:50:24 UTC

[jira] Assigned: (IVY-776) NPE when specifying both resolveId and inline in an Ivy:Resolve

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

Maarten Coene reassigned IVY-776:
---------------------------------

    Assignee: Maarten Coene

> NPE when specifying both resolveId and inline in an Ivy:Resolve 
> ----------------------------------------------------------------
>
>                 Key: IVY-776
>                 URL: https://issues.apache.org/jira/browse/IVY-776
>             Project: Ivy
>          Issue Type: Bug
>          Components: Ant
>    Affects Versions: 2.0.0-beta-1, 2.0.0-beta-2
>         Environment: Windows XP, Ivy 2 beta 1 and beta 2
>            Reporter: Nascif Abousalh-Neto
>            Assignee: Maarten Coene
>             Fix For: 2.0
>
>
> If I specify both inline mode (in which case file has to be null) and resolveId, IvyResolve will die with a NPE when trying to get the value to set on "ivy.resolved.file." + resolveId. It dies on the call to file.getAbsolutePath(). Note how file is checked for null outside of the resolveId code branch, but not inside.
> Also, why are the basic properties (like "ivy.resolved.file") always set even if resolveId is specified? I would expect that one or the other set of properties would be set, but not both. 
> IvyResolve.java, line 269 (on beta-2)
>                 if (file != null) {
>                     getProject().setProperty("ivy.resolved.file", file.getAbsolutePath());
>                     settings.setVariable("ivy.resolved.file", file.getAbsolutePath());
>                 }
>                 if (resolveId != null) {
>                     ...
>                     getProject().setProperty("ivy.resolved.file." + resolveId,
>                         file.getAbsolutePath());
>                     settings
>                             .setVariable("ivy.resolved.file." + resolveId, file.getAbsolutePath());
>                 }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.