From: Robin Stocker Date: Sat, 20 Oct 2012 18:11:34 +0000 (+0200) Subject: AbstractTreeIterator: Add toString with entry path X-Git-Tag: v2.2.0.201212191850-r~63^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=f54b74225c54c3935ad19ba84112882808554752;p=jgit.git AbstractTreeIterator: Add toString with entry path Helps when debugging tree walking code. Change-Id: I7ba3846a028a1538787a7d4fbf50f7c487cae6c7 --- diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/AbstractTreeIterator.java b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/AbstractTreeIterator.java index 752f20bf38..0b8df130f8 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/AbstractTreeIterator.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/AbstractTreeIterator.java @@ -671,4 +671,9 @@ public abstract class AbstractTreeIterator { public void getName(byte[] buffer, int offset) { System.arraycopy(path, pathOffset, buffer, offset, pathLen - pathOffset); } + + @Override + public String toString() { + return getClass().getSimpleName() + "[" + getEntryPathString() + "]"; + } }