Skip to content

Commit

Permalink
fix: jdk dependend string splitting #157
Browse files Browse the repository at this point in the history
Signed-off-by: Joke de Buhr <[email protected]>
  • Loading branch information
joke committed Mar 16, 2024
1 parent 587d1a9 commit 33d519c
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@

import java.util.List;
import java.util.regex.Pattern;
import java.util.stream.Collectors;

import static java.util.Arrays.asList;
import static java.util.Collections.emptyList;
import static java.util.stream.Collectors.toList;

public class CapturedOutputImpl implements CapturedOutput {
Expand All @@ -20,6 +19,9 @@ public String toString() {

@Override
public List<String> getLines() {
if (buffer.length() == 0) {
return emptyList();
}
return NEWLINES.splitAsStream(buffer.toString())
.collect(toList());
}
Expand Down

0 comments on commit 33d519c

Please sign in to comment.