On Mon, 11 May 2020 22:27:27 GMT, Nir Lisker <[email protected]> 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

Reply via email to