RFR: 8358450: Viewport characteristics media features [v20]

Michael Strauß mstrauss at openjdk.org
Fri Jan 9 13:59:32 UTC 2026


On Fri, 9 Jan 2026 09:48:30 GMT, Markus Mack <mmack at openjdk.org> wrote:

>> Michael Strauß has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   update copyright years
>
> modules/javafx.graphics/src/main/java/com/sun/javafx/css/media/MediaQuery.java line 55:
> 
>> 53:      * @return the context awareness flags
>> 54:      */
>> 55:     int getContextAwareness();
> 
> Have you considered using an EnumSet here for stronger typing?

Yes, it also was an `EnumSet` in an earlier revision. However, these expressions are immutable, which an `EnumSet` is not. So I'd have to wrap the enum set in an unmodifiable set, which adds indirections on a hot path (or accept that these structures are not truly immutable). A primitive `int` is immutable by nature...

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

PR Review Comment: https://git.openjdk.org/jfx/pull/1844#discussion_r2676284528


More information about the openjfx-dev mailing list