Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Keppler2018-10-20 09:13:15 -0400
committerMatthias Sohn2018-10-20 09:42:00 -0400
commit96020a11b84f9daf4a81586b53ccb78f5abfcf2e (patch)
treea1db35ef86a4775e3e5763a3d5b1e51625f725e4 /org.eclipse.egit.core.test/src
parentf2f1bf59dd5bb248cc9d6ffb8d27e26197973810 (diff)
downloadegit-96020a11b84f9daf4a81586b53ccb78f5abfcf2e.tar.gz
egit-96020a11b84f9daf4a81586b53ccb78f5abfcf2e.tar.xz
egit-96020a11b84f9daf4a81586b53ccb78f5abfcf2e.zip
[releng] Fix deprecated GitBlobStorage constructor usage
Use the chained constructor instead of the deprecated constructor. Change-Id: Ib2a2e32eca77a883f1ec0f6d76f8200b50293a66 Signed-off-by: Michael Keppler <Michael.Keppler@gmx.de>
Diffstat (limited to 'org.eclipse.egit.core.test/src')
-rw-r--r--org.eclipse.egit.core.test/src/org/eclipse/egit/core/storage/GitBlobStorageTest.java21
1 files changed, 16 insertions, 5 deletions
diff --git a/org.eclipse.egit.core.test/src/org/eclipse/egit/core/storage/GitBlobStorageTest.java b/org.eclipse.egit.core.test/src/org/eclipse/egit/core/storage/GitBlobStorageTest.java
index 49b715a27..7121d3cde 100644
--- a/org.eclipse.egit.core.test/src/org/eclipse/egit/core/storage/GitBlobStorageTest.java
+++ b/org.eclipse.egit.core.test/src/org/eclipse/egit/core/storage/GitBlobStorageTest.java
@@ -64,7 +64,8 @@ public class GitBlobStorageTest extends GitTestCase {
@Test
public void testOk() throws Exception {
ObjectId id = createFile(repository, project.getProject(), "file", "data");
- GitBlobStorage blobStorage = new GitBlobStorage(repository, "p/file", id);
+ GitBlobStorage blobStorage = new GitBlobStorage(repository, "p/file",
+ id, null);
assertEquals("file", blobStorage.getName());
assertEquals("data", testUtils.slurpAndClose(blobStorage.getContents()));
assertEquals(Path.fromPortableString("p/file").toOSString(), blobStorage.getFullPath().toOSString());
@@ -112,7 +113,9 @@ public class GitBlobStorageTest extends GitTestCase {
@Test
public void testFailNotFound() throws Exception {
- GitBlobStorage blobStorage = new GitBlobStorage(repository, "file", ObjectId.fromString("0123456789012345678901234567890123456789"));
+ GitBlobStorage blobStorage = new GitBlobStorage(repository, "file",
+ ObjectId.fromString("0123456789012345678901234567890123456789"),
+ null);
assertEquals("file", blobStorage.getName());
try {
blobStorage.getContents();
@@ -124,7 +127,9 @@ public class GitBlobStorageTest extends GitTestCase {
@Test
public void testFailWrongType() throws Exception {
- GitBlobStorage blobStorage = new GitBlobStorage(repository, "file", ObjectId.fromString("4b825dc642cb6eb9a060e54bf8d69288fbee4904"));
+ GitBlobStorage blobStorage = new GitBlobStorage(repository, "file",
+ ObjectId.fromString("4b825dc642cb6eb9a060e54bf8d69288fbee4904"),
+ null);
assertEquals("file", blobStorage.getName());
try {
blobStorage.getContents();
@@ -138,7 +143,10 @@ public class GitBlobStorageTest extends GitTestCase {
public void testFailCorrupt() throws Exception {
try {
createFileCorruptShort(repository, project.getProject(), "file", "data");
- GitBlobStorage blobStorage = new GitBlobStorage(repository, "file", ObjectId.fromString("6320cd248dd8aeaab759d5871f8781b5c0505172"));
+ GitBlobStorage blobStorage = new GitBlobStorage(repository, "file",
+ ObjectId.fromString(
+ "6320cd248dd8aeaab759d5871f8781b5c0505172"),
+ null);
assertEquals("file", blobStorage.getName());
blobStorage.getContents();
fail("We should not be able to read this blob");
@@ -151,7 +159,10 @@ public class GitBlobStorageTest extends GitTestCase {
public void testFailCorrupt2() throws Exception {
try {
createFileCorruptShort(repository, project.getProject(), "file", "datjhjhjhjhjhjhjjkujioedfughjuop986rdfghjhiu7867586redtfguy675r6tfguhyo76r7tfa");
- GitBlobStorage blobStorage = new GitBlobStorage(repository, "file", ObjectId.fromString("526ef34fc76ab0c35ccee343bda1a626efbd4134"));
+ GitBlobStorage blobStorage = new GitBlobStorage(repository, "file",
+ ObjectId.fromString(
+ "526ef34fc76ab0c35ccee343bda1a626efbd4134"),
+ null);
assertEquals("file", blobStorage.getName());
blobStorage.getContents();
fail("We should not be able to read this blob");

Back to the top