| Summary: | NPE editing join column for invalid relationship mapping | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [WebTools] Dali JPA Tools | Reporter: | Karen Butzke <karenfbutzke> | ||||
| Component: | General | Assignee: | Karen Butzke <karenfbutzke> | ||||
| Status: | VERIFIED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | neil.hauge, raghunathan.srinivasan | ||||
| Version: | 2.3 | Flags: | neil.hauge:
pmc_approved?
(david_williams) raghunathan.srinivasan: pmc_approved+ neil.hauge: pmc_approved? (naci.dai) neil.hauge: pmc_approved? (deboer) neil.hauge: pmc_approved? (neil.hauge) neil.hauge: pmc_approved? (kaloyan) neil.hauge: review+ |
||||
| Target Milestone: | 2.3 RC1 | ||||||
| Hardware: | PC | ||||||
| OS: | Windows XP | ||||||
| Whiteboard: | PMC_approved | ||||||
| Attachments: |
|
||||||
Created attachment 167219 [details]
proposed patch against head
The attached patch adds the appropriate null checks to prevent this NPE.
* Explain why you believe this is a stop-ship defect. Or, if it is a "hotbug" (requested by an adopter) please document it as such. NPE encountered in UI in error case. Not a stop-ship defect, but very low risk fix for ugly looking bug. * Is there a work-around? If so, why do you believe the work-around is insufficient? Avoid the invalid relationship mapping. * How has the fix been tested? Is there a test case attached to the bugzilla record? Has a JUnit Test been added? Developer tested. * Give a brief technical overview. Who has reviewed this fix? Simple addition of two null checks. I have reviewed the fix. * What is the risk associated with this fix? Very low risk. checked in for 2.3RC1 verified fixed in build WTP-I-3.2.0-20100507065327 |
Given the following entity in a Generic 2.0 JPA project, open the JPA details view and look at he Join Strategy Join columns section. Clck on the Join column in the list and press the Edit... button. NPE occurs and the edit dialog does not appear @Entity public class Person { private int id; @OneToMany @JoinColumn private String foo; } Caused by: java.lang.NullPointerException at org.eclipse.jpt.ui.internal.details.JoinColumnInJoiningStrategyStateObject.getDbSchema(JoinColumnInJoiningStrategyStateObject.java:60) at org.eclipse.jpt.ui.internal.details.JoinColumnInJoiningStrategyStateObject.tables(JoinColumnInJoiningStrategyStateObject.java:55) at org.eclipse.jpt.ui.internal.details.BaseJoinColumnDialogPane$13.listIterator_(BaseJoinColumnDialogPane.java:342)