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.observable/src/org/eclipse/core/databinding/observable/map/AbstractObservableMap.java
import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.AssertionFailedException;
/**
 * 
 * <p>
 * This class is thread safe. All state accessing methods must be invoked from
 * the {@link Realm#isCurrent() current realm}. Methods for adding and removing
 * listeners may be invoked from any thread.
 * </p>
 * @since 1.0
 */
public abstract class AbstractObservableMap extends AbstractMap implements
		IObservableMap {
	private ChangeSupport changeSupport;
	private boolean stale;
	/**
	 */
	public AbstractObservableMap() {
		this(Realm.getDefault());
	}
	/**
	 * 
	 */
	protected void lastListenerRemoved() {
	}
	/**
	 * 
	 */
	protected void firstListenerAdded() {
	}