|Recent addIfPossible [message #768299]
||Mon, 19 December 2011 16:54
| Rhett Hudson
Registered: September 2010
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?
Powered by FUDForum
. Page generated in 0.01799 seconds