Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 312712 - NPE canceling new connection dialog after selecting Ingres, prevents closing wizard
Summary: NPE canceling new connection dialog after selecting Ingres, prevents closing ...
Status: RESOLVED FIXED
Alias: None
Product: Data Tools
Classification: Tools
Component: Connectivity (show other bugs)
Version: 1.8   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: 1.8   Edit
Assignee: Brian Fitzpatrick CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-12 16:49 EDT by Karen Butzke CLA
Modified: 2010-05-18 11:21 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Karen Butzke CLA 2010-05-12 16:49:59 EDT
Looks like my patch for bug 306295 caused this bug to appear.

Open the New Connection Profile wizard.
Select Ingres and then press cancel and you get a silent NPE and are unable to close the wizard. I had to kill Eclipse.

java.lang.NullPointerException
at org.eclipse.datatools.connectivity.internal.ui.DriverListCombo.dispose(DriverListCombo.java:1082)
at org.eclipse.datatools.connectivity.db.generic.ui.GenericDBProfileDetailsWizardPage.dispose(GenericDBProfileDetailsWizardPage.java:477)


I am not sure of the correct solution, but some possibilities are:
1. Have the IngresProfileDetailsWizardPage extend ExtensibleProfileDetailsWizardPage instead of GenericDBProfileDetailsWizardPage.  It appears to be the only profile that extends this, but there must be a reason for that.
2. Fix the GenericDBProfileDetailsWizardPage to build the DriverListCombo in the createCustomControl instead of building it on construction of the object. This would make it match ExtensibleProfileDetailsWizardPage and insure that the images are created in the DriverListCombo.
3.Just add null checks in the dispose? Though it really seems like a programmer error for these to ever be null.

The layout of GnericDBProfileDetailsWizardPage has also been screwed up.  You'll notice this if you view the Ingres connection page, the labels for the text fields are in the wrong location.
Comment 1 Brian Fitzpatrick CLA 2010-05-18 11:18:16 EDT
I'll take #3 for $1000 Alex. :)

Honestly Karen, I don't want to go in and muck about in the Ingres stuff or change a final to a non-final variable this late in the game. I agree that #2 is probably the better way to go but I'm afraid of the ripples this may cause.
Comment 2 Brian Fitzpatrick CLA 2010-05-18 11:20:03 EDT
Delivered to o.e.d.connectivity.ui as tag v201005182319
Comment 3 Karen Butzke CLA 2010-05-18 11:21:38 EDT
Understandable, null checks, nice and low-risk