Merge "Provide encoding to String#getBytes()"

This commit is contained in:
Han-Wen NIenhuys 2022-08-09 12:17:32 -04:00 committed by Gerrit Code Review @ Eclipse.org
commit 1ee0b9b79f
1 changed files with 2 additions and 1 deletions

View File

@ -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 @@ protected static InputStream createInputStream(String[] inputLines) {
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;
}