aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CommitAndLogCommandTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CommitAndLogCommandTest.java')
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CommitAndLogCommandTest.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CommitAndLogCommandTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CommitAndLogCommandTest.java
index ca0630ea35..6f1e0cf220 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CommitAndLogCommandTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CommitAndLogCommandTest.java
@@ -42,6 +42,7 @@
*/
package org.eclipse.jgit.api;
+import static java.nio.charset.StandardCharsets.UTF_8;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
@@ -358,7 +359,7 @@ public class CommitAndLogCommandTest extends RepositoryTestCase {
messageHeader + messageFooter)
.setInsertChangeId(true).call();
// we should find a real change id (at the end of the file)
- byte[] chars = commit.getFullMessage().getBytes();
+ byte[] chars = commit.getFullMessage().getBytes(UTF_8);
int lastLineBegin = RawParseUtils.prevLF(chars, chars.length - 2);
String lastLine = RawParseUtils.decode(chars, lastLineBegin + 1,
chars.length);
@@ -371,7 +372,7 @@ public class CommitAndLogCommandTest extends RepositoryTestCase {
.setInsertChangeId(true).call();
// we should find a real change id (in the line as dictated by the
// template)
- chars = commit.getFullMessage().getBytes();
+ chars = commit.getFullMessage().getBytes(UTF_8);
int lineStart = 0;
int lineEnd = 0;
for (int i = 0; i < 4; i++) {
@@ -389,7 +390,7 @@ public class CommitAndLogCommandTest extends RepositoryTestCase {
messageHeader + changeIdTemplate + messageFooter)
.setInsertChangeId(false).call();
// we should find the untouched template
- chars = commit.getFullMessage().getBytes();
+ chars = commit.getFullMessage().getBytes(UTF_8);
lineStart = 0;
lineEnd = 0;
for (int i = 0; i < 4; i++) {