diff options
author | Shawn O. Pearce <spearce@spearce.org> | 2010-06-28 11:54:58 -0700 |
---|---|---|
committer | Shawn O. Pearce <spearce@spearce.org> | 2010-06-28 11:54:58 -0700 |
commit | acb7be2c5adb270d21182d389ce93f3bca38cd29 (patch) | |
tree | 56f8a6d9adc48a303beec91b9313537b0a7ce57a /org.eclipse.jgit.junit/src | |
parent | 6b62e53b607630b6c00411741972838ced552f4d (diff) | |
download | jgit-acb7be2c5adb270d21182d389ce93f3bca38cd29.tar.gz jgit-acb7be2c5adb270d21182d389ce93f3bca38cd29.zip |
Refactor Repository.openObject to be Repository.open
We drop the "Object" suffix, because its pretty clear here that
we want to open an object, given that we pass in AnyObjectId as
the main parameter. We also fix the calling convention to throw
a MissingObjectException or IncorrectObjectTypeException, so that
callers don't have to do this error checking themselves.
Change-Id: I72c43353cea8372278b032f5086d52082c1eee39
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'org.eclipse.jgit.junit/src')
-rw-r--r-- | org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/TestRepository.java | 4 |
1 files changed, 2 insertions, 2 deletions
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 daa959f116..a179773d15 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 @@ -563,7 +563,7 @@ public class TestRepository<R extends Repository> { if (o == null) break; - final byte[] bin = db.openObject(o).getCachedBytes(); + final byte[] bin = db.open(o, o.getType()).getCachedBytes(); oc.checkCommit(bin); assertHash(o, bin); } @@ -573,7 +573,7 @@ public class TestRepository<R extends Repository> { if (o == null) break; - final byte[] bin = db.openObject(o).getCachedBytes(); + final byte[] bin = db.open(o, o.getType()).getCachedBytes(); oc.check(o.getType(), bin); assertHash(o, bin); } |