Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsNPE in SelectionModel
https://www.eclipse.org/forums/index.php/mv/msg/666911/1264798/#msg_1264798
with Bug 414548 the issue from of this topic was fixed. There is still a lot of optimism in the selectionmodel. (NPE if the result of
Is that done intentionally? If there is no cell under these coordinates, there are no selected cells, one could argue.
Cheers,
J ]]>Joachim Fuchs2014-03-05T14:08:38-00:00Re: NPE in SelectionModel
https://www.eclipse.org/forums/index.php/mv/msg/666911/1264822/#msg_1264822
Quote:
If there is no cell under these coordinates, there are no selected cells
That statement is correct. While working a lot with NatTable, doing really fancy stuff, whenever at that place a NPE was thrown, something else was wrong. Because the question for the selection state of a cell in the SelectionModel is typically only requested by the SelectionLayer. And it should never ask for the selection state of a cell that does not exist.
Quote:
Is that done intentionally?
I don't think possible NPEs are implemented intentionally. But as I said, in my experience a NPE should not occur if not something else is wrong. And the wrong things mostly caused by wrong usage.
If you give me a valid use case why the null check should be performed, you create a ticket telling about it, I am willing to add the null check of course. ]]>Dirk Fauth2014-03-05T14:31:51-00:00