mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8266155: Convert java.base to use Stream.toList()
Reviewed-by: bpb, naoto, iris, chegar
This commit is contained in:
parent
c36c63a008
commit
dd05158b24
8 changed files with 14 additions and 25 deletions
|
@ -3824,7 +3824,7 @@ public final class String
|
|||
}
|
||||
char lastChar = charAt(length - 1);
|
||||
boolean optOut = lastChar == '\n' || lastChar == '\r';
|
||||
List<String> lines = lines().collect(Collectors.toList());
|
||||
List<String> lines = lines().toList();
|
||||
final int outdent = optOut ? 0 : outdent(lines);
|
||||
return lines.stream()
|
||||
.map(line -> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue