From f07b60239c3e3bca7c75705c678dd32a12047e09 Mon Sep 17 00:00:00 2001 From: David Pursehouse Date: Thu, 8 Mar 2018 09:44:01 +0900 Subject: Consistently use Constants.CHARSET rather than StandardCharsets.UTF_8 Change-Id: I6714fc3666e1bced22abba94ceb700477349586e Signed-off-by: David Pursehouse --- .../tst/org/eclipse/jgit/storage/file/FileBasedConfigTest.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'org.eclipse.jgit.test/tst/org/eclipse/jgit/storage') diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/storage/file/FileBasedConfigTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/storage/file/FileBasedConfigTest.java index 7f0d60295c..0dea5ce97b 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/storage/file/FileBasedConfigTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/storage/file/FileBasedConfigTest.java @@ -42,7 +42,7 @@ */ package org.eclipse.jgit.storage.file; -import static java.nio.charset.StandardCharsets.UTF_8; +import static org.eclipse.jgit.lib.Constants.CHARSET; import static org.eclipse.jgit.util.FileUtils.pathToString; import static org.junit.Assert.assertArrayEquals; import static org.junit.Assert.assertEquals; @@ -105,7 +105,7 @@ public class FileBasedConfigTest { @Test public void testUTF8withoutBOM() throws IOException, ConfigInvalidException { - final File file = createFile(CONTENT1.getBytes(UTF_8)); + final File file = createFile(CONTENT1.getBytes(CHARSET)); final FileBasedConfig config = new FileBasedConfig(file, FS.DETECTED); config.load(); assertEquals(ALICE, config.getString(USER, null, NAME)); @@ -121,7 +121,7 @@ public class FileBasedConfigTest { bos1.write(0xEF); bos1.write(0xBB); bos1.write(0xBF); - bos1.write(CONTENT1.getBytes(UTF_8)); + bos1.write(CONTENT1.getBytes(CHARSET)); final File file = createFile(bos1.toByteArray()); final FileBasedConfig config = new FileBasedConfig(file, FS.DETECTED); @@ -135,7 +135,7 @@ public class FileBasedConfigTest { bos2.write(0xEF); bos2.write(0xBB); bos2.write(0xBF); - bos2.write(CONTENT2.getBytes(UTF_8)); + bos2.write(CONTENT2.getBytes(CHARSET)); assertArrayEquals(bos2.toByteArray(), IO.readFully(file)); } -- cgit v1.2.3