From f54b74225c54c3935ad19ba84112882808554752 Mon Sep 17 00:00:00 2001 From: Robin Stocker Date: Sat, 20 Oct 2012 20:11:34 +0200 Subject: [PATCH] AbstractTreeIterator: Add toString with entry path Helps when debugging tree walking code. Change-Id: I7ba3846a028a1538787a7d4fbf50f7c487cae6c7 --- .../src/org/eclipse/jgit/treewalk/AbstractTreeIterator.java | 5 +++++ 1 file changed, 5 insertions(+) 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() + "]"; + } } -- 2.39.5