ensure the path is never null

This commit is contained in:
Eugene Zhuravlev
2012-06-20 14:09:49 +02:00
parent 464292db2c
commit 456f22ac9e
@@ -447,12 +447,18 @@ public final class TreeView implements AntOutputView, OccurenceNavigator {
}
public void finishTarget() {
myParentPath = myParentPath.getParentPath();
final TreePath parentPath = myParentPath.getParentPath();
if (parentPath != null) {
myParentPath = parentPath;
}
}
public void finishTask() {
myCurrentTaskName = null;
myParentPath = myParentPath.getParentPath();
final TreePath parentPath = myParentPath.getParentPath();
if (parentPath != null) {
myParentPath = parentPath;
}
}
@Nullable