diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheTree.java b/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheTree.java index 0cbb83d6e..8bcf4bf3e 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheTree.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheTree.java @@ -249,7 +249,15 @@ public DirCacheTree getChild(final int i) { return children[i]; } - ObjectId getObjectId() { + /** + * Get the tree's ObjectId. + *

+ * If {@link #isValid()} returns false this method will return null. + * + * @return ObjectId of this tree or null. + * @since 4.3 + */ + public ObjectId getObjectId() { return id; }