From 30c6c7542190c149e2aee792f992a312a5fc5793 Mon Sep 17 00:00:00 2001 From: David Pursehouse Date: Tue, 4 Sep 2018 10:53:10 +0900 Subject: Deprecate Constants.CHARSET in favor of StandardCharsets.UTF_8 Change-Id: I3b748620f067582afef20f144feebe40d0332be2 Signed-off-by: David Pursehouse --- .../tst/org/eclipse/jgit/lfs/lib/LongObjectIdTest.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'org.eclipse.jgit.lfs.test/tst/org/eclipse/jgit') diff --git a/org.eclipse.jgit.lfs.test/tst/org/eclipse/jgit/lfs/lib/LongObjectIdTest.java b/org.eclipse.jgit.lfs.test/tst/org/eclipse/jgit/lfs/lib/LongObjectIdTest.java index 8642e7eb3b..92a8176f57 100644 --- a/org.eclipse.jgit.lfs.test/tst/org/eclipse/jgit/lfs/lib/LongObjectIdTest.java +++ b/org.eclipse.jgit.lfs.test/tst/org/eclipse/jgit/lfs/lib/LongObjectIdTest.java @@ -43,6 +43,7 @@ package org.eclipse.jgit.lfs.lib; +import static java.nio.charset.StandardCharsets.UTF_8; import static java.nio.charset.StandardCharsets.US_ASCII; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; @@ -62,7 +63,6 @@ import java.util.Locale; import org.eclipse.jgit.junit.JGitTestUtil; import org.eclipse.jgit.lfs.errors.InvalidLongObjectIdException; import org.eclipse.jgit.lfs.test.LongObjectIdTestUtils; -import org.eclipse.jgit.lib.Constants; import org.eclipse.jgit.util.FileUtils; import org.junit.AfterClass; import org.junit.BeforeClass; @@ -393,7 +393,7 @@ public class LongObjectIdTest { AnyLongObjectId id1 = LongObjectIdTestUtils.hash("test"); ByteArrayOutputStream os = new ByteArrayOutputStream(64); try (OutputStreamWriter w = new OutputStreamWriter(os, - Constants.CHARSET)) { + UTF_8)) { id1.copyTo(w); } assertEquals(id1, LongObjectId.fromString(os.toByteArray(), 0)); @@ -404,7 +404,7 @@ public class LongObjectIdTest { AnyLongObjectId id1 = LongObjectIdTestUtils.hash("test"); ByteArrayOutputStream os = new ByteArrayOutputStream(64); try (OutputStreamWriter w = new OutputStreamWriter(os, - Constants.CHARSET)) { + UTF_8)) { char[] buf = new char[64]; id1.copyTo(buf, w); } -- cgit v1.2.3