Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » Recent addIfPossible
Recent addIfPossible [message #768299] Mon, 19 December 2011 21:54 Go to next message
Rhett Hudson is currently offline Rhett HudsonFriend
Messages: 43
Registered: September 2010
Member
After my recent upgrade to 0.9+ Graphiti I've noted an issue with a method call implemented by AbstractFeatureProvider's addIfPossible() method. Specifically, it always returns null. The local variable used as the return value is initialized to null and no other assignment is ever made to it.

In the Chess example, the CreateChessMoveFeature's create() method has a nearly identical line to the one I use.

  // Add the connection to the diagram
  newConnection = (Connection) getFeatureProvider().addIfPossible(addContext);


It returns the value without dereferencing it directly. My codes does, which is why I got an immediate NullPointerException.

Is this expected behavior? Or should I log a bug against it?
Re: Recent addIfPossible [message #768635 is a reply to message #768299] Tue, 20 December 2011 14:06 Go to previous messageGo to next message
Michael Wenz is currently offline Michael WenzFriend
Messages: 1637
Registered: July 2009
Location: Walldorf, Germany
Senior Member
Rhett,
this appears to be a bug. Would you please open a bugzilla?

Thanks,
Michael
Re: Recent addIfPossible [message #768686 is a reply to message #768635] Tue, 20 December 2011 15:55 Go to previous message
Rhett Hudson is currently offline Rhett HudsonFriend
Messages: 43
Registered: September 2010
Member
Bug 367204
Previous Topic:Difference between Add and Create Feature
Next Topic:Collapse Feature: how to hide an element?
Goto Forum:
  


Current Time: Sat Nov 29 07:31:46 GMT 2014

Powered by FUDForum. Page generated in 0.17727 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software