RFR: JDK-8256950: Add record attribute support to symbol generator CreateSymbols [v3]

Jan Lahoda jlahoda at openjdk.java.net
Thu Dec 3 09:39:57 UTC 2020

On Tue, 1 Dec 2020 12:06:25 GMT, Jan Lahoda <jlahoda at openjdk.org> wrote:

>> test/langtools/tools/javac/platform/createsymbols/CreateSymbolsTestImpl.java line 513:
>>> 511:                              public java.util.List<java.lang.String> l();
>>> 512:                            }
>>> 513:                            """,
>> I don't understand why the lines with `\n` in a text block
> There is a combination of factors here:
> -jcheck (AFAIK) does not allow trailing whitespaces, even not on otherwise empty lines inside textblocks
> -textblocks only remove indentation that is common on all lines.
> So, without having '\n', we would have to strip all the whitespace on the empty lines (to pass jcheck), which would mean the text block's content would no longer match the output. There are a few ways to solve this (almost surely an incomplete list):
> -do some trick to have the common indent, but no trailing whitespace. '\n' is one of them.
> -not indent the text block
> -do some post-processing on the text block's value or the actual test output, to make them match
> -not use textblocks

I stand corrected here - blank lines do not count when the common indent is computed. Removed here:


PR: https://git.openjdk.java.net/jdk/pull/1480

More information about the compiler-dev mailing list