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

Jan Lahoda jlahoda at openjdk.java.net
Tue Dec 1 12:08:58 UTC 2020


On Tue, 1 Dec 2020 01:43:47 GMT, Jonathan Gibbons <jjg at openjdk.org> wrote:

>> Jan Lahoda has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Fixing tests on Windows - normalizing line endings.
>
> 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

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

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



More information about the build-dev mailing list