[JGIT PATCH 08/23] Remove the unused PackFile.get(ObjectId) form
Everyone passes in a WindowCursor, except this one test case.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
---
.../tst/org/spearce/jgit/lib/T0004_PackReader.java | 2 +-
.../src/org/spearce/jgit/lib/PackFile.java | 19 -------------------
2 files changed, 1 insertions(+), 20 deletions(-)
diff --git a/org.spearce.jgit.test/tst/org/spearce/jgit/lib/T0004_PackReader.java b/org.spearce.jgit.test/tst/org/spearce/jgit/lib/T0004_PackReader.java
index 8288e56..f6fff52 100644
--- a/org.spearce.jgit.test/tst/org/spearce/jgit/lib/T0004_PackReader.java
+++ b/org.spearce.jgit.test/tst/org/spearce/jgit/lib/T0004_PackReader.java
@@ -55,7 +55,7 @@ public void test003_lookupCompressedObject() throws IOException {
id = ObjectId.fromString("902d5476fa249b7abc9d84c611577a81381f0327");
pr = new PackFile(db, TEST_IDX, TEST_PACK);
- or = pr.get(id);
+ or = pr.get(new WindowCursor(), id);
assertNotNull(or);
assertEquals(id, or.getId());
assertEquals(Constants.OBJ_TREE, or.getType());
diff --git a/org.spearce.jgit/src/org/spearce/jgit/lib/PackFile.java b/org.spearce.jgit/src/org/spearce/jgit/lib/PackFile.java
index fc1b6ea..cd17bd4 100644
--- a/org.spearce.jgit/src/org/spearce/jgit/lib/PackFile.java
+++ b/org.spearce.jgit/src/org/spearce/jgit/lib/PackFile.java
@@ -117,25 +117,6 @@ public boolean hasObject(final AnyObjectId id) {
/**
* Get an object from this pack.
*
- * @param id
- * the object to obtain from the pack. Must not be null.
- * @return the object loader for the requested object if it is contained in
- * this pack; null if the object was not found.
- * @throws IOException
- * the pack file or the index could not be read.
- */
- public PackedObjectLoader get(final AnyObjectId id) throws IOException {
- final WindowCursor wc = new WindowCursor();
- try {
- return get(wc, id);
- } finally {
- wc.release();
- }
- }
-
- /**
- * Get an object from this pack.
- *
* @param curs
* temporary working space associated with the calling thread.
* @param id
--
1.6.1.rc4.301.g5497a