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.

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

Commit messages:
 - Fix bug where ObjectBinding returns null when revalidated immediately

Changes: https://git.openjdk.org/jfx/pull/829/files
 Webrev: https://webrevs.openjdk.org/?repo=jfx&pr=829&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8290331
  Stats: 22 lines in 2 files changed: 21 ins; 0 del; 1 mod
  Patch: https://git.openjdk.org/jfx/pull/829.diff
  Fetch: git fetch https://git.openjdk.org/jfx pull/829/head:pull/829

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

Reply via email to