diff options
author | David Pursehouse <david.pursehouse@gmail.com> | 2018-03-07 08:29:51 +0900 |
---|---|---|
committer | David Pursehouse <david.pursehouse@gmail.com> | 2018-03-07 09:04:36 +0900 |
commit | 0b4e781f7c2c46d0abe0437c63d9656bc1842cd0 (patch) | |
tree | 5d7e231e4da9a04ddd8950bd7220ac5b5065ee07 /org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/RepositoryTestCase.java | |
parent | 2c5b721161e40cdcfa76548739117ea198ed8942 (diff) | |
download | jgit-0b4e781f7c2c46d0abe0437c63d9656bc1842cd0.tar.gz jgit-0b4e781f7c2c46d0abe0437c63d9656bc1842cd0.zip |
Use StandardCharsets.UTF_8 in tests
Replace hard-coded "UTF-8" string with the constant.
Change-Id: Ie812add2df28e984090563ec7c6e2c0366616424
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
Diffstat (limited to 'org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/RepositoryTestCase.java')
-rw-r--r-- | org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/RepositoryTestCase.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/RepositoryTestCase.java b/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/RepositoryTestCase.java index 8f44620b80..afc2c445cf 100644 --- a/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/RepositoryTestCase.java +++ b/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/RepositoryTestCase.java @@ -46,6 +46,7 @@ package org.eclipse.jgit.junit; +import static java.nio.charset.StandardCharsets.UTF_8; import static org.junit.Assert.assertEquals; import java.io.File; @@ -198,7 +199,7 @@ public abstract class RepositoryTestCase extends LocalDiskRepositoryTestCase { protected static void checkFile(File f, final String checkData) throws IOException { try (Reader r = new InputStreamReader(new FileInputStream(f), - "UTF-8")) { + UTF_8)) { if (checkData.length() > 0) { char[] data = new char[checkData.length()]; assertEquals(data.length, r.read(data)); |