[code-reflection] RFR: Model String Template [v5]

Paul Sandoz psandoz at openjdk.org
Wed Feb 28 19:25:58 UTC 2024


On Wed, 28 Feb 2024 18:49:08 GMT, Mourad Abbay <mabbay at openjdk.org> wrote:

>> Model String Template
>
> Mourad Abbay has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Remove unnecessary comments

This looks good. We can revisit the result type more generally later on.

Perhaps add a test case such as:


        StringTemplate.Processor<?, RuntimeException> X = STR;
        Object o = X."<some template>";

src/jdk.compiler/share/classes/com/sun/tools/javac/comp/ReflectMethods.java line 2110:

> 2108:             Value processorValue = toValue(tree.processor);
> 2109: 
> 2110:             List<Value> literalsValues = tree.fragments.map(f -> append(CoreOps.constant(JavaType.J_L_STRING, f)));

Suggestion:

            List<Value> fragments = tree.fragments.map(f -> append(CoreOps.constant(JavaType.J_L_STRING, f)));

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

Marked as reviewed by psandoz (Lead).

PR Review: https://git.openjdk.org/babylon/pull/30#pullrequestreview-1907078580
PR Review Comment: https://git.openjdk.org/babylon/pull/30#discussion_r1506460996


More information about the babylon-dev mailing list