RFR: 8290310: ChangeListener events are incorrect or misleading when a nested change occurs [v16]
John Hendrikx
jhendrikx at openjdk.org
Sun Jun 8 09:27:04 UTC 2025
On Sat, 7 Jun 2025 20:55:47 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 152:
>
>> 150: if (changeListenerCount == 0) {
>> 151: valueSetter.accept(value1);
>> 152: action.assertEvents(); // when there are no change listeners, setting a different value (while invalid) should not trigger any events
>
> You can put this comment above the line if you prefer. Personally, I tend to put longer explanations above and more trivial notes on the same line, like `makeChanges(0); // no-op`.
I usually don't count explanatory comments like this against the line length limit (when a line exceeds some arbitrary limit, I don't mind if the part exceeding is purely explanatory or boiler-plate that would just introduce more noise if split over several lines -- this example, but also things like `throws` clauses). I've shortened the comment.
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/1081#discussion_r2134564367
More information about the openjfx-dev
mailing list