RFR: 8257512: Remove use of deprecated primitive constructors in JavaFX [v3]
Nir Lisker
nlisker at openjdk.java.net
Thu Mar 11 15:10:10 UTC 2021
On Thu, 11 Mar 2021 06:01:04 GMT, Ambarish Rapte <arapte at openjdk.org> 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
More information about the openjfx-dev
mailing list