RFR: 8329948: Remove string template feature [v4]

Maurizio Cimadamore mcimadamore at openjdk.org
Wed Apr 10 15:38:59 UTC 2024


On Wed, 10 Apr 2024 15:17:19 GMT, Jan Lahoda <jlahoda at openjdk.org> wrote:

>> Good catch. Since this was tweaked to be a public API as part of the string template feature, I've reverted this code to what it was prior to string template. That is, now this is a private static final constant, with initializer set to 200 (no need to inhibit javac constant folding, since all uses are from this file).
>
> Just for completeness - note the field is not initialized in its initializator, but using a static init below. Fields like this are not inlined as constants by javac - that would require the value to be provided in the field initializator.

@lahodaj - I understand that - but I reverted to use the initializer, since the initializer was used before string templates (when the field was private).

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

PR Review Comment: https://git.openjdk.org/jdk/pull/18688#discussion_r1559676399


More information about the core-libs-dev mailing list