Bug 165368 [Viewers] TreePath.getParentPath() should return empty path
TreePath.getParentPath() specifies that it returns null for an empty path. However, it also returns null for a one element path. I think it should return the empty path for a one element path, to be consistent with an empty path representing a root element in a tree.
bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/TreePath.java
/**
	 * Returns a copy of this tree path with one segment removed from the end,
	 * or <code>null</code> if this tree path has no segments.
	 * @return a tree path
	 */
	public TreePath getParentPath() {
		int segmentCount = getSegmentCount();
		if (segmentCount <= 1) {
			return null;
		}
		Object[] parentSegments = new Object[segmentCount - 1];
		System.arraycopy(segments, 0, parentSegments, 0, segmentCount - 1);
		return new TreePath(parentSegments);
	}
	/**
	 * Returns a copy of this tree path with the given segment added at the end.
	 * @param newSegment 
	 * @return a tree path
	 */
	public TreePath createChildPath(Object newSegment) {
		int segmentCount = getSegmentCount();
		Object[] childSegments = new Object[segmentCount + 1];
		if(segmentCount>0) {
			System.arraycopy(segments, 0, childSegments, 0, segmentCount);
		}
		childSegments[segmentCount] = newSegment;
		return new TreePath(childSegments);
	}
}