ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nascif Abousalh-Neto (JIRA)" <>
Subject [jira] Created: (IVY-776) NPE when specifying both resolveId and inline in an Ivy:Resolve
Date Mon, 17 Mar 2008 20:48:24 GMT
NPE when specifying both resolveId and inline in an Ivy:Resolve 

                 Key: IVY-776
             Project: Ivy
          Issue Type: Bug
          Components: Ant
    Affects Versions: 2.0.0-beta-2, 2.0.0-beta-1
         Environment: Windows XP, Ivy 2 beta 1 and beta 2
            Reporter: Nascif Abousalh-Neto
             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., 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,
                            .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.

View raw message