On Thu, 26 Feb 2026 00:45:49 GMT, Michael Strauß <[email protected]> wrote:

>> modules/javafx.graphics/src/main/java/javafx/css/Stylesheet.java line 315:
>> 
>>> 313:     private void readBinaryImports(int bssVersion, DataInputStream is, 
>>> String[] strings) throws IOException {
>>> 314:         for (int i = 0, max = is.readInt(); i < max; i++) {
>>> 315:             int queryCount = is.readInt();
>> 
>> should we validate input here, at least make sure it's `>= 0` ?
>
> `MediaQueryList(int)` will throw an exception if a capacity < 0 is passed to 
> the constructor.

there might be a benefit of throwing an exception with a meaningful message, 
but it this case all we really care is that exception is being thrown.

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

PR Review Comment: https://git.openjdk.org/jfx/pull/2031#discussion_r2859706012

Reply via email to