RFR: JDK-8273154: Provide a JavadocTester method for non-overlapping, unordered output matching [v2]
Jonathan Gibbons
jjg at openjdk.java.net
Wed Oct 20 17:50:04 UTC 2021
On Wed, 20 Oct 2021 00:05:53 GMT, Jonathan Gibbons <jjg at openjdk.org> 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
More information about the javadoc-dev
mailing list