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
/*******************************************************************************
 * Copyright (c) 2005, 2006 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
package org.eclipse.jface.viewers;
import org.eclipse.core.runtime.Assert;
/**
 * A tree path denotes a model element in a tree viewer. Tree path objects have
 * value semantics. A model element is represented by a path of elements in the
 * tree from the root element to the leaf element.
 * <p>
 * Clients may instantiate this class. Not intended to be subclassed.
 * </p>
 * 
 * @since 3.2
 */
public final class TreePath {