Community
Participate
Working Groups
getContainer may return null
Created attachment 5142 [details] fix
Move this up to the UI Team.
Sebastian, How did you get this NPE? Can it be reproduced? Which build were you using? What was contained in the .log file when this crash happened?
I was working on bug 38692. I checked out yesterdays org.eclipse.jdt.ui and used the binary plugins of M1 - Version: 2.1.0 Build id: 200306051737 I embedded the JavadocPreferencePage a dialog. At that time I could reproduce the NPE. Unfortunately I cannot reproduce it anymore. The NPE would always appear the first time the dialog was shown. @@@@ This code fragement will produce the NPE: Dialog dialog=new Dialog(shell) { protected Control createDialogArea(Composite parent) { Composite composite= (Composite) super.createDialogArea(parent); PreferencePage page = new PreferencePage() { protected Control createContents(Composite parent) { new Label(parent, SWT.NONE).setText("Test"); return parent; } }; page.createControl(composite); page.setValid(false); //<<<-------- return composite; } }; dialog.open();
Fix applied in build >20030613 - this is consistent with all other callers of getContainer.
verified