On Fri, 28 Oct 2022 19:20:40 GMT, Rémi Forax <[email protected]> wrote:
>> Jim Laskey has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> Update TemplateRuntime::combine
>
> src/java.base/share/classes/java/lang/template/TemplateRuntime.java line 45:
>
>> 43: */
>> 44: @PreviewFeature(feature=PreviewFeature.Feature.STRING_TEMPLATES)
>> 45: public final class TemplateRuntime {
>
> Why this class is public ? and it should be called `TemplateProcessors` linke
> all other classes in Java that store a bunch of static methods (Collections,
> Collectors, etc)
Purely because of the BSM and BSMs access to internals of `java.lang.template`.
I'll work on moving the BSM to `jdk.internal`. and access through
`SharedSecrets`.
> src/java.base/share/classes/java/lang/template/TemplateRuntime.java line 65:
>
>> 63: * @throws Throwable if linkage fails
>> 64: */
>> 65: public static CallSite stringTemplateBSM(
>
> I wonder if this method should be moved to a class named
> `TemplateProcesorFactory` inside `java.lang.runtime`? Like the all the
> bootstrap methods recently added.
Will work on it.
-------------
PR: https://git.openjdk.org/jdk/pull/10889