Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 356058 - [draw2d] ObstructionExample: NPE
Summary: [draw2d] ObstructionExample: NPE
Status: RESOLVED FIXED
Alias: None
Product: GEF
Classification: Tools
Component: GEF-Legacy GEF (MVC) (show other bugs)
Version: 3.7   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 3.7.2 (Indigo SR2)   Edit
Assignee: Alexander Nyßen CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-29 05:51 EDT by Matthias Wienand CLA
Modified: 2016-12-14 11:18 EST (History)
1 user (show)

See Also:


Attachments
Patch for the ObstructionExample.java example application (3.60 KB, patch)
2011-08-29 05:53 EDT, Matthias Wienand CLA
nyssen: iplog+
nyssen: review+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.