RFR: 8243115: Spurious invalidations due to bug in IntegerBinding and other classes
John Hendrikx
jhendrikx at openjdk.java.net
Tue May 12 18:00:22 UTC 2020
On Mon, 11 May 2020 22:27:27 GMT, Nir Lisker <nlisker at openjdk.org> wrote:
> As I started my review I noticed that `unbind` does not null-check its argument `dependencies` like `bind` does and it
> can lead to NPEs. If it is out of scope for this PR to fix this, a new issue should be filed.
I'm fine with doing a fix, but I need to know which one. Avoiding NPE's and silently doing nothing is IMHO not very
desirable as this will give the user of the API no feedback that something went wrong.
So I would prefer to fix this by documenting that these cases will result in a NPE.
The `bind` method has a similar issue -- it doesn't check its array elements for `null`, and will throw a NPE when
attempting to add a listener to `null`. Again, I would just document the NPE so what is clearly a mistake doesn't go
unnoticed.
-------------
PR: https://git.openjdk.java.net/jfx/pull/198
More information about the openjfx-dev
mailing list