RFR: 8364149: Conditional stylesheet imports [v3]
Andy Goryachev
angorya at openjdk.org
Thu Feb 26 16:30:11 UTC 2026
On Thu, 26 Feb 2026 00:45:49 GMT, Michael Strauß <mstrauss at openjdk.org> 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
More information about the openjfx-dev
mailing list