On Wed, 20 Oct 2021 00:05:53 GMT, Jonathan Gibbons <[email protected]> wrote:
>> test/langtools/jdk/javadoc/lib/javadoc/tester/JavadocTester.java line 1030:
>>
>>> 1028: .map(s -> " " + toShortString(s))
>>> 1029: .collect(Collectors.joining("\n")));
>>> 1030: return this;
>>
>> Shouldn't we print lines using the platform line separator?
>>
>> Suggestion:
>>
>> if (name == null) {
>> out.println("Skipping checks for:" + System.lineSeparator()
>> + Stream.of(strings)
>> .map(s -> " " + toShortString(s))
>>
>> .collect(Collectors.joining(System.lineSeparator())));
>> return this;
>>
>> Alternatively, we could println individual lines:
>> Suggestion:
>>
>> if (name == null) {
>> out.println("Skipping checks for:");
>> for (String s : strings) {
>> out.println(" " + toShortString(s));
>> }
>> return this;
>> }
>
> Will consider
Yes, direct writes to `out` should use platform newlines.
Note that strings passed to `passed` and `failed` use `\n` which is translated
to platform newline before output.
-------------
PR: https://git.openjdk.java.net/jdk/pull/5743