RFR: 8326617: String Template FMT removes unnecessary int to long type cast
Chen Liang
liach at openjdk.org
Sun Feb 25 18:10:54 UTC 2024
On Mon, 2 Oct 2023 23:05:29 GMT, Shaojin Wen <duke at openjdk.org> wrote:
> In the current version, FMT."v =%d{1}" will call the StringConcatHelper.prepend(long/byte[]/long) method, which should behave the same as STR."v ={1}". Call StringConcatHelper.prepend(long/byte[]/int), should not convert int to long
>
> Please review and don't hesitate to critique my approach and patch.
Marked as reviewed by liach (Author).
Good catch. Out of scope of this issue, but with the commented out code, the `explicitCastArguments` call before the switch can be removed, and `itype` can simply become `ptype`.
-------------
PR Review: https://git.openjdk.org/jdk/pull/16017#pullrequestreview-1899725121
PR Comment: https://git.openjdk.org/jdk/pull/16017#issuecomment-1963016840
More information about the core-libs-dev
mailing list