[jbosstools-issues] [JBoss JIRA] (JBIDE-26327) Server adapter: NPE when stopping a server adapter whose workspace project was deleted

Andre Dietisheim (JIRA) issues at jboss.org
Wed Aug 29 09:13:00 EDT 2018


    [ https://issues.jboss.org/browse/JBIDE-26327?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13625801#comment-13625801 ] 

Andre Dietisheim commented on JBIDE-26327:
------------------------------------------

the fix is fairly straight forward:
check the project for being null before getting the pom file within it:
{code:title=org.jboss.tools.openshift.core.server.behavior.OpenShiftShutdownController}
protected void updateProject() throws CoreException {
	IProject project = OpenShiftServerUtils.getDeployProject(getServerOrWC());
	    
	IFile pom = project.getFile(IMavenConstants.POM_FILE_NAME);
{code}

> Server adapter: NPE when stopping a server adapter whose workspace project was deleted
> --------------------------------------------------------------------------------------
>
>                 Key: JBIDE-26327
>                 URL: https://issues.jboss.org/browse/JBIDE-26327
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: openshift
>    Affects Versions: 4.9.0.AM2
>            Reporter: Andre Dietisheim
>              Labels: server_adapter
>             Fix For: 4.9.0.Final
>
>         Attachments: image-2018-08-29-15-09-38-939.png
>
>
> steps:
> # ASSERT: have a workspace project, a running OpenShift application and a server adapter started for the 2
> # EXEC: delete the workspace project
> # EXEC: delete the server adapter, making sure that you have the checkbox for stopping the adapter beforehand checked
> Result:
> An NPE occurrs
>  !image-2018-08-29-15-09-38-939.png! 
> {code}
> java.lang.NullPointerException
> 	at org.jboss.tools.openshift.core.server.behavior.OpenShiftShutdownController.updateProject(OpenShiftShutdownController.java:71)
> 	at org.jboss.tools.openshift.core.server.behavior.OpenShiftShutdownController.stop(OpenShiftShutdownController.java:58)
> 	at org.jboss.ide.eclipse.as.wtp.core.server.behavior.ControllableServerBehavior.stop(ControllableServerBehavior.java:255)
> 	at org.eclipse.wst.server.core.internal.Server.stopImpl2(Server.java:3698)
> 	at org.eclipse.wst.server.core.internal.Server.stopImpl(Server.java:3655)
> 	at org.eclipse.wst.server.core.internal.Server$StopJob.run(Server.java:413)
> 	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:60)
> {code}



--
This message was sent by Atlassian JIRA
(v7.5.0#75005)


More information about the jbosstools-issues mailing list