Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 368071

Summary: Dead code in CommonDragAdapterAsistant#getShell()
Product: [Eclipse Project] Platform Reporter: RĂ¼diger Herrmann <ruediger.herrmann>
Component: UIAssignee: Platform UI Triaged <platform-ui-triaged>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: karsten.thoms, remy.suen
Version: 3.7.1   
Target Milestone: 4.11 M3   
Hardware: PC   
OS: Windows 7   
See Also: https://git.eclipse.org/r/135018
https://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=5ce5d2b08f075b43070fb7f5c71fc6f58e16b05f
Whiteboard:

Description RĂ¼diger Herrmann CLA 2012-01-06 18:35:28 EST
It seems that in CommonDragAdapterAsistant#getShell(), in the if branch there is a return statement missing:
  public final Shell getShell() {
    if (contentService != null) {
  	  ((NavigatorContentService) contentService).getShell();
    }
    return PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
  }
it should probably read:
  *return* ((NavigatorContentService) contentService).getShell();
Comment 1 Eclipse Genie CLA 2019-01-13 10:39:55 EST
New Gerrit change created: https://git.eclipse.org/r/135018