Skip to content

Commit 2d116d8

Browse files
committed
Use String.join instead of streaming/collecting
Signed-off-by: Stephen Kitt <skitt@redhat.com>
1 parent de2f194 commit 2d116d8

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/main/java/com/github/difflib/DiffUtils.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
import java.util.List;
2929
import java.util.Objects;
3030
import java.util.function.BiPredicate;
31-
import static java.util.stream.Collectors.joining;
3231

3332
/**
3433
* Implements the difference and patching engine
@@ -143,7 +142,7 @@ private static List<String> compressLines(List<String> lines, String delimiter)
143142
if (lines.isEmpty()) {
144143
return Collections.emptyList();
145144
}
146-
return Collections.singletonList(lines.stream().collect(joining(delimiter)));
145+
return Collections.singletonList(String.join(delimiter, lines));
147146
}
148147

149148
/**

0 commit comments

Comments
 (0)