Skip to main content



      Home
Home » Modeling » Graphiti » Recent addIfPossible
Recent addIfPossible [message #768299] Mon, 19 December 2011 16:54 Go to next message
Eclipse UserFriend
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 09:06 Go to previous messageGo to next message
Eclipse UserFriend
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 10:55 Go to previous message
Eclipse UserFriend
Bug 367204
Previous Topic:Difference between Add and Create Feature
Next Topic:Collapse Feature: how to hide an element?
Goto Forum:
  


Current Time: Wed Jul 23 20:47:33 EDT 2025

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

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

Back to the top