On Tue, 30 Jun 2026 14:21:58 GMT, Andy Goryachev <[email protected]> wrote:

>> Marius Hanl has updated the pull request with a new target base due to a 
>> merge or a rebase. The incremental webrev excludes the unrelated changes 
>> brought in by the merge/rebase. The pull request contains four additional 
>> commits since the last revision:
>> 
>>  - Merge branch 'master' of https://github.com/openjdk/jfx into 
>> 8386663-Stylesheet/StyleClass-list-should-be-lazily-initialized
>>  - MenuItem toString() should also use the new styleClass way.
>>    
>>    TwoLevelFocusListBehavior was very weirdly relying on the toString() 
>> behavior
>>  - Move styleClass.toString into Node.toString()
>>  - 8386663: Stylesheet/StyleClass list should be lazily initialized
>
> modules/javafx.controls/src/test/java/test/javafx/scene/control/PopupControlTest.java
>  line 122:
> 
>> 120:         popup.getStyleClass().add("Hello");
>> 121:         popup.getStyleClass().add("Goodbye");
>> 122:         assertEquals("[Hello, Goodbye]", 
>> popup.getStyleClass().toString());
> 
> wouldn't this be a breaking change?
> if someone is relying on style classes being separated with a space instead 
> of json?

It's a bit odd it was overridden in the first place to do something different 
from what most others `List`s do (although it does look a bit more like what 
you see in CSS that way, but still without the leading dots).

The format is not documented (you'd have to document it on `ObservableList` or 
on the `getStyleClass` method) so we would be allowed to make this change. 
Nobody should be relying on `toString` output, of essentially an 
`ObservableList`, being in a specific format.

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

PR Review Comment: https://git.openjdk.org/jfx/pull/2191#discussion_r3499848455

Reply via email to