From: Shawn O. Pearce Date: Fri, 3 Dec 2010 20:47:37 +0000 (-0800) Subject: Remove unused getTreeId from TreeFormatter X-Git-Tag: v0.10.1~43^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=807ee4797fff512ad491edf0b85dba7e1a9641bf;p=jgit.git Remove unused getTreeId from TreeFormatter Change-Id: If5955757575d4c6053b6f8109e9dc2ecb0502446 Signed-off-by: Shawn O. Pearce Reviewed-by: Chris Aniszczyk --- diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/TreeFormatter.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/TreeFormatter.java index e14e81f6e0..1b2627e01b 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/TreeFormatter.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/TreeFormatter.java @@ -270,25 +270,6 @@ public class TreeFormatter { overflowBuffer.write((byte) 0); } - /** - * Compute the current tree's ObjectId. - * - * @return computed ObjectId of the tree - */ - public ObjectId getTreeId() { - final ObjectInserter.Formatter fmt = new ObjectInserter.Formatter(); - if (buf != null) - return fmt.idFor(OBJ_TREE, buf, 0, ptr); - - try { - final long len = overflowBuffer.length(); - return fmt.idFor(OBJ_TREE, len, overflowBuffer.openInputStream()); - } catch (IOException err) { - // This should never happen, its read failure on a byte array. - throw new RuntimeException(err); - } - } - /** * Insert this tree and obtain its ObjectId. *