diff options
author | Matthias Sohn <matthias.sohn@sap.com> | 2018-09-05 17:52:37 +0200 |
---|---|---|
committer | Matthias Sohn <matthias.sohn@sap.com> | 2018-09-05 17:52:44 +0200 |
commit | 771ca345e5cd8e5e115afc85b9c7a80246631bc1 (patch) | |
tree | e483cc8a9c7fd6c13137cda818c81d0b48e3afd4 /org.eclipse.jgit.lfs.test | |
parent | b6f3bdefce01680be8089e3732d143d7e1059b46 (diff) | |
parent | 2173f441589fbab7214bf59ea1330fff2c9f4c37 (diff) | |
download | jgit-771ca345e5cd8e5e115afc85b9c7a80246631bc1.tar.gz jgit-771ca345e5cd8e5e115afc85b9c7a80246631bc1.zip |
Merge branch 'master' into stable-5.1
* master:
UploadPackTest: Avoid unnecessarily boxing int into Integer
Parse signature of GPG-signed commits
Deprecate Constants.CHARSET in favor of StandardCharsets.UTF_8
Simplify file creation in ResetCommandTest
Specify charset when constructing InputStreamReader
Update Orbit to S20180829155938 for 2018-09 RC1
Replace useminimalnegotation flag with maxhaves flag
Extract protocol v2 fetch request parsing to its own class
FetchV2Request: Rename shallowSince to deepenSince
FetchV2Request: Correct typo in parameter name
FetchV2Request round up (doneReceived, renamings)
Use right variable in error message about depth
UploadPack: avoid conflating shallow commit lists in protocol v2
Bazel: Use hyphen instead of underscore in external repository names
Format BUILD files with buildifier 0.15.0
Upgrade maven-compiler-plugin to 3.8.0
Change-Id: Ibc6feb828e4ff20a3158e6b75dcfce7617e00b0e
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Diffstat (limited to 'org.eclipse.jgit.lfs.test')
-rw-r--r-- | org.eclipse.jgit.lfs.test/src/org/eclipse/jgit/lfs/test/LongObjectIdTestUtils.java | 4 | ||||
-rw-r--r-- | org.eclipse.jgit.lfs.test/tst/org/eclipse/jgit/lfs/lib/LongObjectIdTest.java | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/org.eclipse.jgit.lfs.test/src/org/eclipse/jgit/lfs/test/LongObjectIdTestUtils.java b/org.eclipse.jgit.lfs.test/src/org/eclipse/jgit/lfs/test/LongObjectIdTestUtils.java index e3c6ef80bc..c3c3859467 100644 --- a/org.eclipse.jgit.lfs.test/src/org/eclipse/jgit/lfs/test/LongObjectIdTestUtils.java +++ b/org.eclipse.jgit.lfs.test/src/org/eclipse/jgit/lfs/test/LongObjectIdTestUtils.java @@ -42,7 +42,7 @@ */ package org.eclipse.jgit.lfs.test; -import static org.eclipse.jgit.lib.Constants.CHARSET; +import static java.nio.charset.StandardCharsets.UTF_8; import java.io.BufferedInputStream; import java.io.FileNotFoundException; @@ -66,7 +66,7 @@ public class LongObjectIdTestUtils { */ public static LongObjectId hash(String s) { MessageDigest md = Constants.newMessageDigest(); - md.update(s.getBytes(CHARSET)); + md.update(s.getBytes(UTF_8)); return LongObjectId.fromRaw(md.digest()); } 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); } |