aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/LocalDiskRepositoryTestCase.java4
-rw-r--r--org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/TestRepository.java2
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Log.java2
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevObjectTest.java4
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/storage/file/RefUpdateTest.java2
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/ReceivePackRefFilterTest.java6
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/WalkFetchConnection.java4
7 files changed, 10 insertions, 14 deletions
diff --git a/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/LocalDiskRepositoryTestCase.java b/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/LocalDiskRepositoryTestCase.java
index 47956e5127..d28c7edb50 100644
--- a/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/LocalDiskRepositoryTestCase.java
+++ b/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/LocalDiskRepositoryTestCase.java
@@ -409,10 +409,6 @@ public abstract class LocalDiskRepositoryTestCase extends TestCase {
}
protected static void assertEquals(AnyObjectId exp, AnyObjectId act) {
- if (exp != null)
- exp = exp.copy();
- if (act != null)
- act = act.copy();
Assert.assertEquals(exp, act);
}
diff --git a/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/TestRepository.java b/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/TestRepository.java
index afe1c0bc63..858fe64a6d 100644
--- a/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/TestRepository.java
+++ b/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/TestRepository.java
@@ -586,7 +586,7 @@ public class TestRepository<R extends Repository> {
md.update(Constants.encodeASCII(bin.length));
md.update((byte) 0);
md.update(bin);
- Assert.assertEquals(id.copy(), ObjectId.fromRaw(md.digest()));
+ Assert.assertEquals(id, ObjectId.fromRaw(md.digest()));
}
/**
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Log.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Log.java
index fbc019fa24..d0ae22a216 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Log.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Log.java
@@ -161,7 +161,7 @@ class Log extends RevWalkTextBuiltin {
out.print(" ");
c.getId().copyTo(outbuffer, out);
if (decorate) {
- Collection<Ref> list = allRefsByPeeledObjectId.get(c.copy());
+ Collection<Ref> list = allRefsByPeeledObjectId.get(c);
if (list != null) {
out.print(" (");
for (Iterator<Ref> i = list.iterator(); i.hasNext(); ) {
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevObjectTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevObjectTest.java
index 2b24aa49ad..052d390033 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevObjectTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevObjectTest.java
@@ -60,8 +60,8 @@ public class RevObjectTest extends RevWalkTestCase {
assertTrue(a1.equals((Object) a1));
assertFalse(a1.equals(b1));
- assertTrue(a1.equals(a1.copy()));
- assertTrue(a1.equals((Object) a1.copy()));
+ assertTrue(a1.equals(a1));
+ assertTrue(a1.equals((Object) a1));
assertFalse(a1.equals(""));
final RevWalk rw2 = new RevWalk(db);
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/storage/file/RefUpdateTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/storage/file/RefUpdateTest.java
index 871700898f..a8a6d9d823 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/storage/file/RefUpdateTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/storage/file/RefUpdateTest.java
@@ -115,7 +115,7 @@ public class RefUpdateTest extends SampleDataRepositoryTestCase {
assertNotNull(r.getObjectId());
assertNotSame(newid, r.getObjectId());
assertSame(ObjectId.class, r.getObjectId().getClass());
- assertEquals(newid.copy(), r.getObjectId());
+ assertEquals(newid, r.getObjectId());
List<org.eclipse.jgit.storage.file.ReflogReader.Entry> reverseEntries1 = db.getReflogReader("refs/heads/abc").getReverseEntries();
org.eclipse.jgit.storage.file.ReflogReader.Entry entry1 = reverseEntries1.get(0);
assertEquals(1, reverseEntries1.size());
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/ReceivePackRefFilterTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/ReceivePackRefFilterTest.java
index b331f9cf54..f89959c68c 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/ReceivePackRefFilterTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/ReceivePackRefFilterTest.java
@@ -102,7 +102,7 @@ public class ReceivePackRefFilterTest extends LocalDiskRepositoryTestCase {
Transport t = Transport.open(src, uriOf(dst));
try {
t.fetch(PM, Collections.singleton(new RefSpec("+refs/*:refs/*")));
- assertEquals(B.copy(), src.resolve(R_MASTER));
+ assertEquals(B, src.resolve(R_MASTER));
} finally {
t.close();
}
@@ -154,7 +154,7 @@ public class ReceivePackRefFilterTest extends LocalDiskRepositoryTestCase {
Ref master = refs.get(R_MASTER);
assertNotNull("has master", master);
- assertEquals(B.copy(), master.getObjectId());
+ assertEquals(B, master.getObjectId());
}
public void testSuccess() throws Exception {
@@ -219,7 +219,7 @@ public class ReceivePackRefFilterTest extends LocalDiskRepositoryTestCase {
assertNotNull("have result", r);
assertNull("private not advertised", r.getAdvertisedRef(R_PRIVATE));
assertSame("master updated", RemoteRefUpdate.Status.OK, u.getStatus());
- assertEquals(N.copy(), dst.resolve(R_MASTER));
+ assertEquals(N, dst.resolve(R_MASTER));
}
public void testCreateBranchAtHiddenCommitFails() throws Exception {
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/WalkFetchConnection.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/WalkFetchConnection.java
index 237b4314c4..a669ac5cec 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/WalkFetchConnection.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/WalkFetchConnection.java
@@ -317,7 +317,7 @@ class WalkFetchConnection extends BaseFetchConnection {
// If we had any prior errors fetching this object they are
// now resolved, as the object was parsed successfully.
//
- fetchErrors.remove(id.copy());
+ fetchErrors.remove(id);
}
private void processBlob(final RevObject obj) throws TransportException {
@@ -461,7 +461,7 @@ class WalkFetchConnection extends BaseFetchConnection {
// We could not obtain the object. There may be reasons why.
//
- List<Throwable> failures = fetchErrors.get(id.copy());
+ List<Throwable> failures = fetchErrors.get(id);
final TransportException te;
te = new TransportException(MessageFormat.format(JGitText.get().cannotGet, id.name()));