summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorRobin Stocker2012-10-20 14:11:34 (EDT)
committer Robin Stocker2012-10-20 14:12:25 (EDT)
commitf54b74225c54c3935ad19ba84112882808554752 (patch)
tree3e95d8de72c987f15d967a4464c94e55396d7a74
parent1ff82ca6d0137eee1ecbbf20c96390c872691f7c (diff)
downloadjgit-f54b74225c54c3935ad19ba84112882808554752.zip
jgit-f54b74225c54c3935ad19ba84112882808554752.tar.gz
jgit-f54b74225c54c3935ad19ba84112882808554752.tar.bz2
AbstractTreeIterator: Add toString with entry pathrefs/changes/22/8322/1
Helps when debugging tree walking code. Change-Id: I7ba3846a028a1538787a7d4fbf50f7c487cae6c7
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/treewalk/AbstractTreeIterator.java5
1 files changed, 5 insertions, 0 deletions
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 752f20b..0b8df13 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() + "]";
+ }
}