RFR: 8377427: Reduce substring allocations in Color.web(String, double) [v7]

John Hendrikx jhendrikx at openjdk.org
Wed Feb 18 08:31:28 UTC 2026


On Tue, 17 Feb 2026 20:40:59 GMT, Andy Goryachev <angorya at openjdk.org> wrote:

> OK, I am not against doing this in principle. But it's a new, non-trivial algorithm that needs to have additional tests and the implementation needs to be reviewed. The PR description should also change to reflect this added complexity.

The tests are there to proof that it parses doubles correctly. The algorithm can be treated as a black box. It doesn't need to be exhaustively checked, that has already been done far more thoroughly than we can hope to do -- it's like having to prove that some complex sorting algorithm works; you don't need to fully understand the algorithm, just verify some edge cases, to proof you didn't make a mistake "copying" the proven algorithm.

I checked what Michael copied, and I didn't see any mistakes. The test cases (and probably numerous dependent tests in the rest of FX) proof that it works.

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

PR Review Comment: https://git.openjdk.org/jfx/pull/2069#discussion_r2820987766


More information about the openjfx-dev mailing list