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

Bug 349722

Summary: NPE deleting generator name from "Generator name" combo
Product: [WebTools] Dali JPA Tools Reporter: Nan Li <nan.n.li>
Component: JPAAssignee: Neil Hauge <neil.hauge>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: jolene.moffitt, neil.hauge
Version: unspecifiedFlags: neil.hauge: review+
Target Milestone: 3.0.1   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
Stack Trace
none
Proposed Patch neil.hauge: iplog+

Description Nan Li CLA 2011-06-17 15:37:02 EDT
Build Identifier: I20110526-1708

1. Select an Id mapping and go to Primary Key Generation section in the JPA Details view
2. Enter something to the "Generator name" field and then delete it

The attached NPE as below appears in the error log and the value is not removed from the source.

java.lang.NullPointerException
	at org.eclipse.jpt.jpa.ui.internal.details.GeneratedValueComposite$4.setValue_(GeneratedValueComposite.java:164)
	at org.eclipse.jpt.jpa.ui.internal.details.GeneratedValueComposite$4.setValue(GeneratedValueComposite.java:153)
	at org.eclipse.jpt.jpa.ui.internal.details.GeneratedValueComposite$4.setValue(GeneratedValueComposite.java:1)

Reproducible: Always
Comment 1 Nan Li CLA 2011-06-17 15:39:15 EDT
Created attachment 198211 [details]
Stack Trace
Comment 2 Neil Hauge CLA 2011-06-17 15:52:47 EDT
Investigate for 3.0.1.
Comment 3 Nan Li CLA 2011-06-20 10:44:49 EDT
Created attachment 198260 [details]
Proposed Patch
Comment 4 Neil Hauge CLA 2011-06-23 17:52:36 EDT
Patch committed to 3.0.1 and head.
Comment 5 Neil Hauge CLA 2011-07-01 16:25:23 EDT
Moving JPA specific bugs to new JPA component in bugzilla.
Comment 6 Neil Hauge CLA 2011-08-10 17:53:01 EDT
Must have forgotten to mark this as resolved.
Comment 7 Jolene Moffitt CLA 2011-08-15 13:48:10 EDT
Verified in Build I-3.4.0-20110812160550 

Verified the generator name can be deleted for an Id mapping attribute without error.  See the link to view test steps for verification.
http://wiki.eclipse.org/Dali_3.0.1