Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-23758

Avoid caught NPE in wst StopAction by providing an empty list instead of null

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 4.4.2.Final
    • Fix Version/s: 4.4.3.AM2
    • Component/s: server
    • Labels:
      None
    • Steps to Reproduce:
      Hide

      to observe it it,

      • launch JBDS in debug mode with a breakpoint set to catch NullPointerException
      Show
      to observe it it, launch JBDS in debug mode with a breakpoint set to catch NullPointerException

      Description

      when starting JBDS, there is a silent caught NPE in AsbtractServerAction.selectionChanged because org.jboss.ide.eclipse.as.ui.actions.AbstractServerActionDelegate$4 is returning null instead of an empty selection

      Thread [main] (Suspended (exception NullPointerException))	
      	owns: RunnableLock  (id=138)	
      	StopAction(AbstractServerAction).selectionChanged(IStructuredSelection) line: 75	
      	StopAction.<init>(Shell, ISelectionProvider) line: 36	
      	StopServerActionDelegate.init(IWorkbenchWindow) line: 24	
      	WWinPluginAction.initDelegate() line: 187	
      	WWinPluginAction(PluginAction).createDelegate() line: 125	
      	WWinPluginAction.refreshActionList() line: 167	
      	AbstractUIPlugin$1.run() line: 482	
      	RunnableLock.run() line: 35	
      	UISynchronizer(Synchronizer).runAsyncMessages(boolean) line: 182	
      	Display.runAsyncMessages(boolean) line: 4203	
      	Display.readAndDispatch() line: 3819	
      	PartRenderingEngine$4.run() line: 1121	
      	Realm.runWithDefault(Realm, Runnable) line: 336	
      	PartRenderingEngine.run(MApplicationElement, IEclipseContext) line: 1022	
      	E4Workbench.createAndRunUI(MApplicationElement) line: 150	
      	Workbench$5.run() line: 687	
      	Realm.runWithDefault(Realm, Runnable) line: 336	
      	Workbench.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 604	
      	PlatformUI.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 148	
      	IDEApplication.start(IApplicationContext) line: 138	
      	EclipseAppHandle.run(Object) line: 196	
      	EclipseAppLauncher.runApplication(Object) line: 134	
      	EclipseAppLauncher.start(Object) line: 104	
      	EclipseStarter.run(Object) line: 388	
      	EclipseStarter.run(String[], Runnable) line: 243	
      	NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method]	
      	NativeMethodAccessorImpl.invoke(Object, Object[]) line: 62	
      	DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 43	
      	Method.invoke(Object, Object...) line: 498	
      	Main.invokeFramework(String[], URL[]) line: 673	
      	Main.basicRun(String[]) line: 610	
      	Main.run(String[]) line: 1519	
      	Main.main(String[]) line: 1492	
      

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                rob.stryker Rob Stryker
                Reporter:
                aurelien.pupier Aurélien Pupier
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: