On Thu, 11 Mar 2021 00:23:48 GMT, Nir Lisker <nlis...@openjdk.org> wrote:

>> Ambarish Rapte has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   correct Float.valueOf()
>
> modules/javafx.controls/src/test/java/test/javafx/scene/chart/XYChartTest.java
>  line 85:
> 
>> 83:         Font f = yaxis.getTickLabelFont();
>> 84:         // default caspian value for font size = 10
>> 85:         assertEquals(10, Double.valueOf(f.getSize()).intValue());
> 
> Any reason to convert `f.getSize()` to `int` and then to `Double`? Is it for 
> flooring the `double`?
> 
> Same for the other places.

`f.getSize()` returns a double value, the statement can also be written as 
`assertEquals(10, f.getSize(), 0f);`
But, as this change is a cleanup and is intended to remove the calls to 
deprecated constructors, I think it should be limited to changing calls to 
autobox or to use `valueOf()` method.

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

PR: https://git.openjdk.java.net/jfx/pull/423

Reply via email to