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

Bug 356058

Summary: [draw2d] ObstructionExample: NPE
Product: [Tools] GEF Reporter: Matthias Wienand <matthias.wienand>
Component: GEF-Legacy GEF (MVC)Assignee: Alexander Nyßen <nyssen>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: nyssen
Version: 3.7   
Target Milestone: 3.7.2 (Indigo SR2)   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Patch for the ObstructionExample.java example application nyssen: iplog+, nyssen: review+

Description Matthias Wienand CLA 2011-08-29 05:51:34 EDT
Build Identifier: I20110613-1736

The ObstructionExample.java Draw2d example does not protect itself against NullPointerExceptions and unaesthetic appearances. If an EllipseDragFigure does not have an oFigure, the access to the attribute causes the example to crash. Besides, the creation of a target ellipse does not work properly if you create a source ellipse and delete it before creating its target. Moreover, the path between the two ellipses is not drawn correctly if the source ellipse gets dragged to another location after it was created.

Reproducible: Always

Steps to Reproduce:
1. Create an ellipse (right mouse button)
2. Delete it (right mouse button)
3. NPE
Comment 1 Matthias Wienand CLA 2011-08-29 05:53:06 EDT
Created attachment 202305 [details]
Patch for the ObstructionExample.java example application
Comment 2 Alexander Nyßen CLA 2011-09-09 12:04:49 EDT
Comment on attachment 202305 [details]
Patch for the ObstructionExample.java example application

Looks good. You already know the game.... Can you please confirm that you have written 100% of the code and have the right to contribute it under terms of the EPL.
Comment 3 Matthias Wienand CLA 2011-09-12 02:50:23 EDT
(In reply to comment #2)
> Comment on attachment 202305 [details]
> Patch for the ObstructionExample.java example application
> 
> Looks good. You already know the game.... Can you please confirm that you have
> written 100% of the code and have the right to contribute it under terms of the
> EPL.

I have written 100% of the code and I have the right to contribute it under the terms of the EPL.
Comment 4 Alexander Nyßen CLA 2011-09-27 12:53:19 EDT
Committed patch to cvs HEAD as well as R_3_7_maintenance branch. Resolving as fixed.