RFR: 8290310: ChangeListener events are incorrect or misleading when a nested change occurs [v16]
John Hendrikx
jhendrikx at openjdk.org
Sun Jun 8 09:31:06 UTC 2025
On Sat, 7 Jun 2025 20:59:29 GMT, Nir Lisker <nlisker at openjdk.org> wrote:
>> John Hendrikx has updated the pull request incrementally with two additional commits since the last revision:
>>
>> - Change StackOverflowException to warning log
>> - Support keeping last message in Logging helper
>
> modules/javafx.base/src/test/java/test/javafx/beans/ObservableValueTest.java line 159:
>
>> 157:
>> 158: assertEquals(value2, action.getValue());
>> 159: action.assertEvents();
>
> Why do you need to `assertEvents` again? I don't see how `action.getValue()` could have relevant side effects.
That's exactly the point. It should have no side effects, so there should be no events to assert (no templates are passed). I've added docs to `assertEvents` to make that a bit more clear.
Edit: I made it even more clear now by having another helper function called `assertNoEvents`.
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/1081#discussion_r2134565667
More information about the openjfx-dev
mailing list