Bug 286795

Summary: Proposal to avoid NPE in IconAndMessageDialog.getSWTImage(..)
Product: [Eclipse Project] Platform Reporter: Natalia Bartol <natalia.bartol>
Component: TeamAssignee: Platform Team Inbox <platform-team-inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3    
Version: 3.6   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Patch_1.0 none

Description Natalia Bartol CLA 2009-08-17 08:48:05 EDT
Created attachment 144659 [details]
Patch_1.0

Build ID:  I20090611-1540

Patch: https://bugs.eclipse.org/bugs/attachment.cgi?id=142880 to bug 107082 throws assertion before NPE happens. It would be better to ensure that invalid access from non-UI thread will not occur at all.

Attached patch is my proposition of improvement. 

I put the whole MultipleYesNoPrompter#confirmOverwrite method call from
MultipleYesNoPrompter#shouldInclude into UI thread and removed running UI
thread  and final variables from the inside of
MultipleYesNoPrompter#confirmOverwrite as no longer needed. Invalid access from
non-UI thread should not occur any more. I added also check if shellProvider.getShell() is not null inside
MultipleYesNoPrompter#shouldInclude to avoid another NPE. 

Related bugs: 107082, 285715.
Comment 1 Eclipse Webmaster CLA 2019-09-06 15:30:47 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.