RFR: 8257512: Remove use of deprecated primitive constructors in JavaFX [v3]
Ambarish Rapte
arapte at openjdk.java.net
Thu Mar 11 05:50:12 UTC 2021
On Thu, 11 Mar 2021 00:41:48 GMT, Nir Lisker <nlisker at openjdk.org> wrote:
>> Ambarish Rapte has updated the pull request incrementally with one additional commit since the last revision:
>>
>> correct Float.valueOf()
>
> modules/javafx.web/src/ios/java/javafx/scene/web/JSONDecoder.java line 101:
>
>> 99: long val = Long.parseLong(sNum);
>> 100: if ((val <= Integer.MAX_VALUE) && (Integer.MIN_VALUE <= val)) {
>> 101: return Integer.valueOf(int) val);
>
> Autobox?
I think, when LHS is of type `Object`, it is good to be explicit on creating Object, it improves readability.
In this case, type of val is `long`, so autobox would create an object of `Long` not `Integer`.
-------------
PR: https://git.openjdk.java.net/jfx/pull/423
More information about the openjfx-dev
mailing list