Bug 286795 - Proposal to avoid NPE in IconAndMessageDialog.getSWTImage(..)
Summary: Proposal to avoid NPE in IconAndMessageDialog.getSWTImage(..)
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Team (show other bugs)
Version: 3.6   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform Team Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-17 08:48 EDT by Natalia Bartol CLA
Modified: 2019-09-06 15:30 EDT (History)
0 users

See Also:


Attachments
Patch_1.0 (2.48 KB, patch)
2009-08-17 08:48 EDT, Natalia Bartol CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.