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
hash = hashCode(null);
		}
		return hash;
	}
	/**
	 * Returns a hash code computed from the hash codes of the segments, using
	 * the given comparer to compute the hash codes of the segments.
	 * 
	 * @param comparer
	 *            comparer to use or <code>null</code> if the segments' hash
	 *            codes should be computed by calling their hashCode() methods.
	 * @return the computed hash code
	 */
	public int hashCode(IElementComparer comparer) {
		int result = 0;
		for (int i = 0; i < segments.length; i++) {
			if (comparer == null) {
				result += segments[i].hashCode();
			} else {
				result += comparer.hashCode(segments[i]);
			}
		}
		return result;
	}
	/**
	 * Returns whether this path is equivalent to the given path using the
	 * specified comparer to compare individual elements.
	 * 
	 * @param otherPath
	 *            tree path to compare to