You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by "Nascif Abousalh-Neto (JIRA)" <ji...@apache.org> on 2008/03/17 21:48:24 UTC
[jira] Created: (IVY-776) NPE when specifying both resolveId and
inline in an Ivy:Resolve
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-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.
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.
[jira] Assigned: (IVY-776) NPE when specifying both resolveId and
inline in an Ivy:Resolve
Posted by "Maarten Coene (JIRA)" <ji...@apache.org>.
[ 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.
[jira] Resolved: (IVY-776) NPE when specifying both resolveId and
inline in an Ivy:Resolve
Posted by "Maarten Coene (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/IVY-776?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Maarten Coene resolved IVY-776.
-------------------------------
Resolution: Fixed
Fix Version/s: (was: 2.0)
2.0-RC1
Fixed in trunk, thanks for reporting this.
The reason both set of properties are set is to keep backwards compatibility to build scripts that were written for Ivy-1.x where the resolveId attribute didn't exist.
> 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-RC1
>
>
> 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.