On Thu, 14 Jul 2022 23:37:31 GMT, John Hendrikx <jhendr...@openjdk.org> wrote:

> I introduced a bug with the fluent bindings PR which affects all 
> ObjectBindings.
> 
> This is the code that fails:
> 
>         SimpleObjectProperty<Boolean> condition = new 
> SimpleObjectProperty<>(true);
>         ObservableValue<String> binding = condition.map(Object::toString);
> 
>         binding.addListener(o -> { binding.getValue(); });
> 
>         condition.set(false);
> 
>         assertEquals(false, binding.getValue());  // returns null (!)
> 
> This PR fixes this problem and adds a test case to cover it.

This pull request has now been integrated.

Changeset: 4959f1bc
Author:    John Hendrikx <jhendr...@openjdk.org>
Committer: Kevin Rushforth <k...@openjdk.org>
URL:       
https://git.openjdk.org/jfx/commit/4959f1bce6078230353af4ed6552e1415b1adfaa
Stats:     27 lines in 2 files changed: 26 ins; 0 del; 1 mod

8290331: Binding value left null when immediately revalidated in invalidation 
listener

Reviewed-by: mstrauss, kcr

-------------

PR: https://git.openjdk.org/jfx/pull/829

Reply via email to