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

Bug 312712

Summary: NPE canceling new connection dialog after selecting Ingres, prevents closing wizard
Product: [Tools] Data Tools Reporter: Karen Butzke <karenfbutzke>
Component: ConnectivityAssignee: Brian Fitzpatrick <bfitzpat>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: P3    
Version: 1.8   
Target Milestone: 1.8   
Hardware: PC   
OS: Windows XP   
Whiteboard:

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