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
private final Object object;
	private boolean updating = false;
	private final PropertyDescriptor propertyDescriptor;
	private ListenerSupport listenerSupport;
	/**
	 * @param realm
	 * @param object
	 * @param descriptor
	 */
	public JavaBeanObservableValue(Realm realm, Object object,
			PropertyDescriptor descriptor) {
		super(realm);
		this.object = object;
		this.propertyDescriptor = descriptor;
	}
	protected void firstListenerAdded() {
		PropertyChangeListener listener = new PropertyChangeListener() {
			public void propertyChange(java.beans.PropertyChangeEvent event) {
				if (!updating) {
					final ValueDiff diff = Diffs.createValueDiff(event.getOldValue(),
											event.getNewValue());
					getRealm().exec(new Runnable(){
						public void run() {
							fireValueChange(diff);
						}});
				}
			}
		};
		
		if (listenerSupport == null) {