RFR: JDK-8285932 Implementation of JEP 430 String Templates (Preview) [v30]

Jim Laskey jlaskey at openjdk.org
Wed Nov 23 19:22:14 UTC 2022


On Wed, 23 Nov 2022 17:26:58 GMT, Roger Riggs <rriggs at openjdk.org> wrote:

>> Will clean up javadoc for FormatProcessor::process.
>> 
>> It is unfortunate. If you have any ideas will gladly take them on. On the other hand, not sure if the exception is any worse that a static initializer exception visually.
>
> Since FormatProcessor is scanning for format strings (in stringTempateFormat), it could check for the wrong number and misplaced format strings and throw.  It would make the exception more specific to the arguments to the FMT.process() and easier for the developer to correct.

It is doing that now, but I can make the message more informative. The problem still exists that this is always done in the bootstrap method.

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

PR: https://git.openjdk.org/jdk/pull/10889


More information about the compiler-dev mailing list