On Wed, 23 Nov 2022 22:40:31 GMT, Nir Lisker <[email protected]> wrote:
>> John Hendrikx has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> Revert instanceof changes and replace with null checks
>
> modules/javafx.controls/src/test/java/test/javafx/scene/chart/CategoryAxisTest.java
> line 122:
>
>> 120:
>> 121: @Test public void checkCategorySpacingReadOnlyCannotBind() {
>> 122: assertTrue(axis.categorySpacingProperty() instanceof
>> ReadOnlyDoubleProperty);
>
> In theory, this should be replaced with a `null` check, but if it's `null`
> the test will fail anyway, so it should be fine.
I wonder if this change should be reverted. Since this is in a test, there is
value in ensuring that what is true today remains true. This will ensure that
the test will fail if the return type of this property ever changed to make the
`instanceof` check no longer pass. Now admittedly, this is unlikely, since it
would be a breaking change that should be caught during a code review, but it
does have some (small) value.
-------------
PR: https://git.openjdk.org/jfx/pull/959