[
https://issues.jboss.org/browse/JBIDE-24872?page=com.atlassian.jira.plugi...
]
Andre Dietisheim edited comment on JBIDE-24872 at 8/16/17 6:00 AM:
-------------------------------------------------------------------
The following code, that was moved further down with the changes for JBIDE-24184 is the
cause.
the given resource (-parameter) can be null and should be checked for:
{code}
public static IBuildConfig getBuildConfigFor(IResource resource, List<IBuildConfig>
buildConfigs) {
if (ResourceKind.SERVICE.equals(resource.getKind())) {
return getBuildConfigFor((IService) resource, buildConfigs);
} else if (ResourceKind.DEPLOYMENT_CONFIG.equals(resource.getKind())) {
return getBuildConfigFor((IDeploymentConfig) resource, buildConfigs);
} else {
return null;
}
}
{code}
was (Author: adietish):
The following code, that was moved further down with the changes for JBIDE-24184 is the
cause (resource can be null, should be checked for):
{code}
public static IBuildConfig getBuildConfigFor(IResource resource, List<IBuildConfig>
buildConfigs) {
if (ResourceKind.SERVICE.equals(resource.getKind())) {
return getBuildConfigFor((IService) resource, buildConfigs);
} else if (ResourceKind.DEPLOYMENT_CONFIG.equals(resource.getKind())) {
return getBuildConfigFor((IDeploymentConfig) resource, buildConfigs);
} else {
return null;
}
}
{code}
NullPointerException in ResourceUtils.getBuildConfigFor
-------------------------------------------------------
Key: JBIDE-24872
URL:
https://issues.jboss.org/browse/JBIDE-24872
Project: Tools (JBoss Tools)
Issue Type: Bug
Components: openshift
Reporter: Automated Error Reporting Bot
Assignee: Andre Dietisheim
Fix For: 4.5.1.AM2
The following problem was reported via the automated error reporting:
Message: Unhandled event loop exception
java.lang.NullPointerException: null
at
org.jboss.tools.openshift.internal.core.util.ResourceUtils.getBuildConfigFor(ResourceUtils.java:663)
at
org.jboss.tools.openshift.internal.ui.server.ServerSettingsWizardPage$11.widgetSelected(ServerSettingsWizardPage.java:494)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:249)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
Bundles:
| org.eclipse.swt | 3.105.3.v20170228-0512 | 3.105.3.v20170228-0512 |
| org.jboss.tools.openshift.core | 3.3.3.v20170510-1453 | 3.3.3.v20170510-1453 |
| org.jboss.tools.openshift.ui | 3.3.3.v20170510-2204 | 3.3.3.v20170510-2204 |
Operating Systems:
| Linux | 4.11.11.fc26 | 4.11.11.fc26 |
The above information is a snapshot of the collected data. Visit
https://aer.ctrlflow.com/redhat/reviewers/#!/problems/598bb1a2e4b085ca039... for the
latest data.
Thank you for your assistance.
Your friendly error-reports-inbox.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)