[
https://issues.apache.org/jira/browse/IVYDE-133?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12651956#action_12651956
]
Matt Goldspink commented on IVYDE-133:
--------------------------------------
I hit this error this morning when starting up Eclipse with 2.0.0.beta1. I
don't think the statement: "When launching Eclipse, and if there are some
failing resolve job" is correct because the code in the
IvyClasspathContainerConfiguration.setConfStatus() method says:
if (e != null) {
setResolveStatus(new Status(IStatus.ERROR, IvyPlugin.ID,
IStatus.ERROR, e
.getMessage(), e.getCause()));
} else {
setResolveStatus(Status.OK_STATUS); <!--- So it sets the status
when its ok
}
I did a bit of debugging and it looks like the line:
IvyPlugin.getDefault().getContainerDecorator().statusChaged(this);
throws the null pointer and its because the call to getContainerDecoractor() is
returning null. The reason is because Eclipse hasn't yet initialized that part
of the plugin because none of the projects are expanded yet. Is it possible to
just add a simple check to change the above line to be:
IvyClasspathContainerDecorator decorator =
IvyPlugin.getDefault().getContainerDecorator();
if (decorator != null) {
decorator.statusChaged(this);
}
Matt
> The decorators can throw a NPE at startup
> -----------------------------------------
>
> Key: IVYDE-133
> URL: https://issues.apache.org/jira/browse/IVYDE-133
> Project: IvyDE
> Issue Type: Bug
> Affects Versions: 2.0.0.beta1
> Reporter: Nicolas Lalevée
> Assignee: Nicolas Lalevée
> Priority: Minor
> Fix For: 2.0.0.final
>
>
> When launching Eclipse, and if there are some failing resolve job, a NPE can
> be raised:
> {noformat}
> java.lang.NullPointerException
> at
> org.apache.ivyde.eclipse.cpcontainer.IvyClasspathContainerConfiguration.setConfStatus(IvyClasspathContainerConfiguration.java:329)
> at
> org.apache.ivyde.eclipse.cpcontainer.IvyClasspathContainerConfiguration.getModuleDescriptor(IvyClasspathContainerConfiguration.java:634)
> at
> org.apache.ivyde.eclipse.cpcontainer.IvyResolveJob.run(IvyResolveJob.java:200)
> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
> {noformat}
> This may be due to the way the decorator listeners are accessed.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.