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

Bug 346728

Summary: NPE during creation of new diagram
Product: [WebTools] Dali JPA Tools Reporter: Stefan Dimov <stefan.dimov>
Component: Diagram EditorAssignee: Project Inbox <dali.diagrameditor-inbox>
Status: VERIFIED FIXED QA Contact: Stefan Dimov <stefan.dimov>
Severity: major    
Priority: P1 CC: jolene.moffitt, neil.hauge, raghunathan.srinivasan
Version: 3.0Flags: stefan.dimov: pmc_approved? (david_williams)
raghunathan.srinivasan: pmc_approved+
stefan.dimov: pmc_approved? (naci.dai)
stefan.dimov: pmc_approved? (deboer)
neil.hauge: pmc_approved+
stefan.dimov: pmc_approved? (kaloyan)
stefan.dimov: pmc_approved? (cbridgha)
stefan.dimov: review+
neil.hauge: review+
Target Milestone: 3.0 RC2   
Hardware: All   
OS: All   
Whiteboard: PMC_approved
Attachments:
Description Flags
patch none

Description Stefan Dimov CLA 2011-05-20 12:11:13 EDT
When a new JPA project is created and the folder for diagrams doesn't exist physically and the user tries to create a new diagram she gets NPE.
Comment 1 Stefan Dimov CLA 2011-05-20 12:16:06 EDT
Created attachment 196231 [details]
patch
Comment 2 Neil Hauge CLA 2011-05-20 12:22:11 EDT
Stefan,

When you are confident in this fix, please promote for PMC approval including a technical description of the fix, etc.  Thanks.
Comment 3 Stefan Dimov CLA 2011-05-20 12:23:28 EDT
It's definitely a stop-ship defect. Every time the user creates  new project
and tries to open a new diagram she gets NPE

There is a workaround - to create the diagrams folder before trying to open the
diagram, but nevertheless the bug is still very ugly.

The fix was tested manually and all the existing JUnit tests are passing
successfully.

The nature of the bug is that before the creation of a new diagram the code
doesn't check if the diagrams folder exists and if not - to create it.

The risk is moderate, but the bug is ugly, so it has to be fixed for RC2.
Comment 4 Stefan Dimov CLA 2011-05-20 13:20:31 EDT
The patch is committed and released ...
Comment 5 Jolene Moffitt CLA 2011-06-08 11:10:08 EDT
Verified in Build I-3.3.0RC4-20110603221533

Verified when you create a JPA project you can Open Diagram successfully without error.  See the link to view test steps for verification.  http://wiki.eclipse.org/Dali_3.0_RC2