On Thu, 11 Mar 2021 06:01:04 GMT, Ambarish Rapte <[email protected]> wrote:
>> apps/samples/Ensemble8/src/samples/java/ensemble/samples/language/swing/SampleTableModel.java
>> line 54:
>>
>>> 52: {Double.valueOf(567), Double.valueOf(956),
>>> Double.valueOf(1154)},
>>> 53: {Double.valueOf(1292), Double.valueOf(1665),
>>> Double.valueOf(1927)},
>>> 54: {Double.valueOf(1292), Double.valueOf(2559),
>>> Double.valueOf(2774)}
>>
>> Autobox?
>
> The array is of type Object. When LHS is Object then autobox chooses a
> suitable type by itself.
> So here, if we autobox then the values get autoboxed to `Integer`. We do not
> intend to change the test behavior as part of this fix so let's keep this as
> `Double.valueOf`.
I meant that we could use a double literal: `503d` or `503.0`, but if you think
this is more readable then it's fine as is.
-------------
PR: https://git.openjdk.java.net/jfx/pull/423