Fix diff command content (#2036)

Fix diff command getContent which returned always empty string because the results were ignored.
This commit is contained in:
Eduard Heimbuch
2022-05-13 17:59:33 +02:00
committed by GitHub
parent ccdf643804
commit 6a7dc8253d
2 changed files with 3 additions and 1 deletions

View File

@@ -0,0 +1,2 @@
- type: fixed
description: Diff command content ([#2036](https://github.com/scm-manager/scm-manager/pull/2036))

View File

@@ -110,7 +110,7 @@ public final class DiffCommandBuilder extends AbstractDiffCommandBuilder<DiffCom
*/
public String getContent() throws IOException {
try (ByteArrayOutputStream baos = new ByteArrayOutputStream()) {
getDiffResult();
getDiffResult().accept(baos);
return baos.toString();
}
}