RFR: 8345348: CSS media feature queries [v21]
Michael Strauß
mstrauss at openjdk.org
Tue May 6 06:52:38 UTC 2025
On Mon, 5 May 2025 18:11:14 GMT, Andy Goryachev <angorya at openjdk.org> wrote:
>> modules/javafx.graphics/src/main/java/com/sun/javafx/css/media/MediaQuerySerializer.java line 72:
>>
>>> 70: DataOutputStream os,
>>> 71: StyleConverter.StringStore stringStore) throws IOException {
>>> 72: os.writeByte(QueryType.of(mediaQuery).ordinal());
>>
>> potential problem:
>> someone may insert/reorder QueryType enums and break backward compatibility.
>> at a minimum, a warning comment should be added to QueryType, or perhaps some more reliable code in read/writeBinary?
>
> or perhaps use hard-coded values instead 'c', 'f', 'C', 'd', 'n' ?
I've added an explicit `serializedId` value.
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/1655#discussion_r2074825706
More information about the openjfx-dev
mailing list