On Mon, 5 May 2025 18:11:14 GMT, Andy Goryachev <ango...@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

Reply via email to