}
protected static void assertEquals(AnyObjectId exp, AnyObjectId act) {
- if (exp != null)
- exp = exp.copy();
- if (act != null)
- act = act.copy();
Assert.assertEquals(exp, act);
}
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()));
}
/**
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(); ) {
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);
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());
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();
}
Ref master = refs.get(R_MASTER);
assertNotNull("has master", master);
- assertEquals(B.copy(), master.getObjectId());
+ assertEquals(B, master.getObjectId());
}
public void testSuccess() throws Exception {
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 {
// 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 {
// 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()));