[string-templates] Automatically imported template processors
Jim Laskey
james.laskey at oracle.com
Sat Nov 12 02:58:59 UTC 2022
You are correct. I will update the JEP.
I think it would be fine for you to post your experiences. I think that is in the spirit of the open process.
📱
> On Nov 11, 2022, at 10:36 PM, Daniel Jarabek <jarabekit at gmail.com> wrote:
>
> Hi,
>
> JEP-430 states that "FMT is a public static final automatically imported in every Java source file". However, this seems to contradict the javadoc of ValidatingProcessor, which says "The Java compiler automatically imports StringTemplate#STR" and the current implementation, which only automatically imports STR.
>
> I assume this was a change made because FMT is more subjective (it uses Locale.ROOT, which isn't always what is desired) so users should explicitly choose to use it or use their own instance with a different Locale.
>
> Assuming this is an intentional change, the incorrect statement should be removed from the JEP.
>
> -DJ
>
> P.S. I am working on a TemplateProcessor for constructing JavaPoet's (https://github.com/square/javapoet) CodeBlock object. Would it be appropriate and/or appreciated if I posted my results/experiences here?
More information about the amber-dev
mailing list