Merge "TreeWalk: Remove CorruptObjectException from addTree(AbstractTreeIterator)"
This commit is contained in:
commit
7b6122908b
|
@ -574,18 +574,13 @@ public int addTree(final AnyObjectId id) throws MissingObjectException,
|
||||||
* @param p
|
* @param p
|
||||||
* an iterator to walk over. The iterator should be new, with no
|
* an iterator to walk over. The iterator should be new, with no
|
||||||
* parent, and should still be positioned before the first entry.
|
* parent, and should still be positioned before the first entry.
|
||||||
* The tree which the iterator operates on must have the same root
|
* The tree which the iterator operates on must have the same
|
||||||
* as other trees in the walk.
|
* root as other trees in the walk.
|
||||||
*
|
|
||||||
* @return position of this tree within the walker.
|
* @return position of this tree within the walker.
|
||||||
* @throws CorruptObjectException
|
|
||||||
* the iterator was unable to obtain its first entry, due to
|
|
||||||
* possible data corruption within the backing data store.
|
|
||||||
*/
|
*/
|
||||||
public int addTree(final AbstractTreeIterator p)
|
public int addTree(AbstractTreeIterator p) {
|
||||||
throws CorruptObjectException {
|
int n = trees.length;
|
||||||
final int n = trees.length;
|
AbstractTreeIterator[] newTrees = new AbstractTreeIterator[n + 1];
|
||||||
final AbstractTreeIterator[] newTrees = new AbstractTreeIterator[n + 1];
|
|
||||||
|
|
||||||
System.arraycopy(trees, 0, newTrees, 0, n);
|
System.arraycopy(trees, 0, newTrees, 0, n);
|
||||||
newTrees[n] = p;
|
newTrees[n] = p;
|
||||||
|
|
Loading…
Reference in New Issue