Bug 118516 [DataBinding] Asserts should provide meaningful messages
Currently we use JDK Assert in various places in the code. However, if an assert fails, there often is no indication of why it failed or what the assert failure means without looking at the code indicated by the stack trace. It would be nicer if we would log exceptions or throw RuntimeExceptions with useful error messages instead.
bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/tree/TreePath.java
/**
	 * Constant for representing an empty tree path.
	 */
	public static final TreePath EMPTY = new TreePath(new Object[0]);
	
	private Object[] segments;
	private int hash;
	/**
	 * Constructs a path identifying a leaf node in a tree.
	 * 
	 * @param segments
	 *            path of elements to a leaf node in a tree, starting with the
	 *            root element
	 */
	public TreePath(Object[] segments) {
		Assert.isNotNull(segments);
		for (int i = 0; i < segments.length; i++) {
			Assert.isNotNull(segments[i]);
		}
		this.segments = segments;
	}
	/**
	 * Returns the element at the specified index in this path.
	 * 
	 * @param index