aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHan-Wen NIenhuys <hanwen@google.com>2022-08-09 12:17:32 -0400
committerGerrit Code Review @ Eclipse.org <gerrit@eclipse.org>2022-08-09 12:17:32 -0400
commit1ee0b9b79fed6746d32e69bf7bd0264b718395a6 (patch)
tree39096ba1ecaff224805500391675a1757f6ffa0f
parent4d6c6df108dafd98fe59dfe2a1beffb243a53063 (diff)
parentf0524d59f72fea84dfd242ee7d54ec2bbc2acab8 (diff)
downloadjgit-1ee0b9b79fed6746d32e69bf7bd0264b718395a6.tar.gz
jgit-1ee0b9b79fed6746d32e69bf7bd0264b718395a6.zip
Merge "Provide encoding to String#getBytes()"
-rw-r--r--org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/ToolTestCase.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/ToolTestCase.java b/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/ToolTestCase.java
index 5f6b38c25d..55db1a12d9 100644
--- a/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/ToolTestCase.java
+++ b/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/ToolTestCase.java
@@ -9,6 +9,7 @@
*/
package org.eclipse.jgit.pgm;
+import static java.nio.charset.StandardCharsets.UTF_8;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
@@ -213,7 +214,7 @@ public abstract class ToolTestCase extends CLIRepositoryTestCase {
protected static InputStream createInputStream(List<String> inputLines) {
String input = String.join(System.lineSeparator(), inputLines);
- InputStream inputStream = new ByteArrayInputStream(input.getBytes());
+ InputStream inputStream = new ByteArrayInputStream(input.getBytes(UTF_8));
return inputStream;
}