Bug 198519 [DataBinding] JavaBeanObservableValue may cause NPE when used with ComputedValue
Build ID: I20070625-1500 Steps To Reproduce: Simple case: new ComputedValue() { final IObservableValue name = BeansObservables.observeValue(dto, "name"); //$NON-NLS-1$ @Override protected Object calculate() { return name.getValue() != null; } }; More information: When ComputedValue recalculates the value, it calls the makeDirty() and then stopListening() methods which, in turn, may result in call to lastListenerRemoved() (if there are no other listeners attached) in the JavaBeanObservableValue class, causing listenerSupport.dispose() call. From now on, adding new listeners (which happens next during the calculate call) will cause NullPointerException.
bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/internal/beans/JavaBeanObservableValue.java
* 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
 *     Brad Reynolds - bug 164653
 *     Brad Reynolds - bug 164134, 171616
 *******************************************************************************/
package org.eclipse.core.internal.databinding.internal.beans;
import java.beans.PropertyChangeListener;
import java.beans.PropertyDescriptor;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import org.eclipse.core.databinding.BindingException;
import org.eclipse.core.databinding.beans.BeansObservables;
import org.eclipse.core.databinding.beans.IBeanObservable;
import org.eclipse.core.databinding.observable.Diffs;
import org.eclipse.core.databinding.observable.Realm;
import org.eclipse.core.databinding.observable.value.AbstractObservableValue;
import org.eclipse.core.databinding.observable.value.ValueDiff;
import org.eclipse.core.databinding.util.Policy;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
/**
 * @since 1.0
 * 
 */
public class JavaBeanObservableValue extends AbstractObservableValue implements IBeanObservable {