From 0b4e781f7c2c46d0abe0437c63d9656bc1842cd0 Mon Sep 17 00:00:00 2001 From: David Pursehouse Date: Wed, 7 Mar 2018 08:29:51 +0900 Subject: Use StandardCharsets.UTF_8 in tests Replace hard-coded "UTF-8" string with the constant. Change-Id: Ie812add2df28e984090563ec7c6e2c0366616424 Signed-off-by: David Pursehouse --- org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/ArchiveTest.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'org.eclipse.jgit.pgm.test') diff --git a/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/ArchiveTest.java b/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/ArchiveTest.java index 5817566dca..e5c85ebfc7 100644 --- a/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/ArchiveTest.java +++ b/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/ArchiveTest.java @@ -42,6 +42,7 @@ */ package org.eclipse.jgit.pgm; +import static java.nio.charset.StandardCharsets.UTF_8; import static org.junit.Assert.assertArrayEquals; import static org.junit.Assert.assertEquals; import static org.junit.Assert.fail; @@ -611,7 +612,7 @@ public class ArchiveTest extends CLIRepositoryTestCase { private BufferedReader readFromProcess(Process proc) throws Exception { return new BufferedReader( - new InputStreamReader(proc.getInputStream(), "UTF-8")); + new InputStreamReader(proc.getInputStream(), UTF_8)); } private void grepForEntry(String name, String mode, String... cmdline) @@ -749,7 +750,7 @@ public class ArchiveTest extends CLIRepositoryTestCase { // found! List l = new ArrayList<>(); BufferedReader reader = new BufferedReader( - new InputStreamReader(in, "UTF-8")); + new InputStreamReader(in, UTF_8)); String line; while ((line = reader.readLine()) != null) l.add(line); -- cgit v1.2.3