This PR provides a fix for the linked issue. The issue was that when an invalidation listener is removed, and the `ExpressionHelper` type changes from `Generic` to `SingleChange` that it would copy the current value of the `Generic` instance before it was updated (this is because invalidation listeners trigger before change listeners and the current value would only be updated **after** invalidation listeners notifications were completed).
The code now will update the current value before sending out any notifications **if** there are change listeners present to head off this problem. Added a few test cases to verify this. Note: the PR which replaces `ExpressionHelper` does not have this problem: https://github.com/openjdk/jfx/pull/1081 ------------- Commit messages: - Fix problem in ExpressionHelper that could copy the wrong current value Changes: https://git.openjdk.org/jfx/pull/1448/files Webrev: https://webrevs.openjdk.org/?repo=jfx&pr=1448&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8331616 Stats: 69 lines in 2 files changed: 66 ins; 2 del; 1 mod Patch: https://git.openjdk.org/jfx/pull/1448.diff Fetch: git fetch https://git.openjdk.org/jfx.git pull/1448/head:pull/1448 PR: https://git.openjdk.org/jfx/pull/1448