On Fri, 21 Aug 2026 19:19:28 GMT, Michael Strauß <[email protected]> wrote:

>> Changes the `BinarySerializer.writeSimpleSelector` to emit sorted 
>> pseudoclasses' names.
>> 
>> ---------
>> - [x] I confirm that I make this contribution in accordance with the 
>> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai).
>
> modules/javafx.graphics/src/main/java/com/sun/javafx/css/BinarySerializer.java
>  line 176:
> 
>> 174:             Set<PseudoClass> sorted = new 
>> TreeSet<>(PSEUDO_CLASS_COMPARATOR);
>> 175:             sorted.addAll(pseudoClassStates);
>> 176:             pseudoClassStates = sorted;
> 
> If you wanted to say this in fewer words, you could do:
> 
> List<PseudoClass> pseudoClassStates = selector.getPseudoClassStates().stream()
>     .sorted(Comparator.comparing(PseudoClass::getPseudoClassName))
>     .toList();

no I don't :-)

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

PR Review Comment: https://git.openjdk.org/jfx/pull/2271#discussion_r3833053592

Reply via email to