On Wed, 17 Dec 2025 13:43:35 GMT, Marius Hanl <[email protected]> wrote:
> When compiling JavaFX with Java 25, a new warning appears. This warning will > result in a compilation failure because warnings are treated as error > (`-Werror`). > > The following warning appears: > > >> Task :controls:compileJava > C:..\jfx\modules\javafx.controls\src\main\java\javafx\scene\control\SplitPane.java:320: > warning: [identity] use of a value-based class with an operation that > expects reliable identity > private final WeakHashMap<Integer, Double> dividerCache = new > WeakHashMap<>(); > ^ > C:..\jfx\modules\javafx.controls\src\main\java\javafx\scene\control\SplitPane.java:320: > warning: [identity] use of a value-based class with an operation that > expects reliable identity > private final WeakHashMap<Integer, Double> dividerCache = new > WeakHashMap<>(); > ^ > error: warnings found and -Werror specified > 1 error > 2 warnings > >> Task :controls:compileJava FAILED > > > The warning makes sense: We use a `WeakHashMap` with the `Integer` class. So > the `Integer` values are saved as `WeakRef` inside the `Map`. This makes no > sense and is rightfully a warning. This pull request has now been integrated. Changeset: 12de69cf Author: Marius Hanl <[email protected]> URL: https://git.openjdk.org/jfx/commit/12de69cf0e5c7be1b830c0ac172fba767b82447d Stats: 3 lines in 1 file changed: 1 ins; 0 del; 2 mod 8373885: Compilation failure due to a warning when compiling with Java 25 Reviewed-by: kcr, angorya, jhendrikx ------------- PR: https://git.openjdk.org/jfx/pull/2010
