On Sat, 14 Sep 2024 06:58:04 GMT, Michael Strauß <mstra...@openjdk.org> wrote:
>> modules/javafx.graphics/src/main/java/javafx/scene/layout/Background.java >> line 292: >> >>> 290: private Background(List<BackgroundFill> fills, >>> List<BackgroundImage> images, int ignored) { >>> 291: Objects.requireNonNull(fills, "fills cannot be null"); >>> 292: Objects.requireNonNull(images, "images cannot be null"); >> >> Are these reached if there is an interpolation from/to null with a non-null? > > Interpolation with `null` is not possible: `Interpolatable.interpolate(T, > double)` is specified to throw NPE when `null` is passed in. When a styleable > property transitions from a null value to a non-null value, it always > transitions as discrete (i.e. is switches at the 50% mark) and doesn't use > `Interpolatable.interpolate`. So when will these checks fail? ------------- PR Review Comment: https://git.openjdk.org/jfx/pull/1522#discussion_r1759684220