aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/sha1/SHA1Test.java
diff options
context:
space:
mode:
authorDavid Pursehouse <david.pursehouse@gmail.com>2018-03-08 09:44:01 +0900
committerMatthias Sohn <matthias.sohn@sap.com>2018-03-11 22:46:52 +0100
commitf07b60239c3e3bca7c75705c678dd32a12047e09 (patch)
treecb8e5e3f5b494852a334551ee03d22b5d3377988 /org.eclipse.jgit.test/tst/org/eclipse/jgit/util/sha1/SHA1Test.java
parent62bc48df60bc852f4f93a721b1599232133ad289 (diff)
downloadjgit-f07b60239c3e3bca7c75705c678dd32a12047e09.tar.gz
jgit-f07b60239c3e3bca7c75705c678dd32a12047e09.zip
Consistently use Constants.CHARSET rather than StandardCharsets.UTF_8
Change-Id: I6714fc3666e1bced22abba94ceb700477349586e Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
Diffstat (limited to 'org.eclipse.jgit.test/tst/org/eclipse/jgit/util/sha1/SHA1Test.java')
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/util/sha1/SHA1Test.java14
1 files changed, 7 insertions, 7 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/sha1/SHA1Test.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/sha1/SHA1Test.java
index e6045a91bd..3c612e1bdd 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/sha1/SHA1Test.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/sha1/SHA1Test.java
@@ -43,7 +43,7 @@
package org.eclipse.jgit.util.sha1;
-import static java.nio.charset.StandardCharsets.UTF_8;
+import static org.eclipse.jgit.lib.Constants.CHARSET;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
@@ -95,15 +95,15 @@ public class SHA1Test {
.fromString("a9993e364706816aba3e25717850c26c9cd0d89d");
MessageDigest m = MessageDigest.getInstance("SHA-1");
- m.update(TEST1.getBytes(UTF_8));
+ m.update(TEST1.getBytes(CHARSET));
ObjectId m1 = ObjectId.fromRaw(m.digest());
SHA1 s = SHA1.newInstance();
- s.update(TEST1.getBytes(UTF_8));
+ s.update(TEST1.getBytes(CHARSET));
ObjectId s1 = ObjectId.fromRaw(s.digest());
s.reset();
- s.update(TEST1.getBytes(UTF_8));
+ s.update(TEST1.getBytes(CHARSET));
ObjectId s2 = s.toObjectId();
assertEquals(m1, s1);
@@ -117,15 +117,15 @@ public class SHA1Test {
.fromString("84983e441c3bd26ebaae4aa1f95129e5e54670f1");
MessageDigest m = MessageDigest.getInstance("SHA-1");
- m.update(TEST2.getBytes(UTF_8));
+ m.update(TEST2.getBytes(CHARSET));
ObjectId m1 = ObjectId.fromRaw(m.digest());
SHA1 s = SHA1.newInstance();
- s.update(TEST2.getBytes(UTF_8));
+ s.update(TEST2.getBytes(CHARSET));
ObjectId s1 = ObjectId.fromRaw(s.digest());
s.reset();
- s.update(TEST2.getBytes(UTF_8));
+ s.update(TEST2.getBytes(CHARSET));
ObjectId s2 = s.toObjectId();
assertEquals(m1, s1);