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.
tests/org.eclipse.jface.tests.databinding/src/org/eclipse/core/tests/databinding/observable/ThreadRealm.java
/**
     * Initializes the realm.
     * 
     * @param thread
     */
    public synchronized void init(Thread thread) {
        if (thread == null) {
            throw new IllegalArgumentException("Parameter thread was null."); 
        }
        Assert.isTrue(this.thread == null, "Realm can only be initialized once.");
        this.thread = thread;
    }
    /**
     * @return <code>true</code> if the current thread is the thread for
     *         the realm
     */
    public boolean isCurrent() {
        return Thread.currentThread() == thread;
    }
    /**
     * @return thread, <code>null</code> if not
     *         {@link #init(Thread) initialized}
     */
    public Thread getThread() {
        return thread;
    }
    /**
     * Queues the provided <code>runnable</code>.
     * 
     * @param runnable