On Thu, 19 Feb 2026 11:04:27 GMT, Michael Strauß <[email protected]> wrote:
>> Color.web(string, double) parses a color string by creating substrings of >> the input. These string allocations can be removed. >> >> CSS numbers are parsed by `CssNumberParser`, which parses CSS-compliant >> numbers using Lemire's algorithm. >> >> There are no new tests for the `Color` class, since the existing tests >> already cover all relevant code paths. > > Michael Strauß has updated the pull request incrementally with one additional > commit since the last revision: > > add test modules/javafx.graphics/src/main/java/com/sun/javafx/css/parser/CssNumberParser.java line 304: > 302: * @see <a href="https://arxiv.org/pdf/2101.11408">Number Parsing at > a Gigabyte per Second</a> > 303: */ > 304: private static final long[] T = new long[] { Warning about a large binary blob of unknown origin in the source. I suggest we do two things here: 1. add a comment explaining what it is and how it is computed in general terms 2. provide the code that generates it, so it can be reviewed at the source level. For example, it might be in a form of a unit test which generates the array and compares it to the one here. modules/javafx.graphics/src/test/java/test/com/sun/javafx/css/parser/CssNumberParserTest.java line 198: > 196: @Test > 197: public void roundingIsCorrectForSubnormals() { > 198: int seed = new Random().nextInt(); please change to a `long seed = new Random().nextLong();` here and elsewhere. ------------- PR Review Comment: https://git.openjdk.org/jfx/pull/2069#discussion_r2828954946 PR Review Comment: https://git.openjdk.org/jfx/pull/2069#discussion_r2828960044
