On Tue, 1 Dec 2020 12:06:25 GMT, Jan Lahoda <jlah...@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: https://github.com/openjdk/jdk/pull/1480/commits/3aaaf28c23ddda71c77ca9923e02e5f3502cde3b ------------- PR: https://git.openjdk.java.net/jdk/pull/1480