Bug 152543 [DataBinding] ValueBinding NPE when update target from model is false
When a ValueBinding is constructed and instructed not to update the target from the model via the BindSpec a NPE is thrown when it tries to access the modelToTargetConverter. Exception in thread "main" java.lang.NullPointerException at org.eclipse.jface.internal.databinding.internal.ValueBinding.doUpdateTargetFromModel(ValueBinding.java:268) at org.eclipse.jface.internal.databinding.internal.ValueBinding.updateTargetFromModel(ValueBinding.java:250) at org.eclipse.jface.internal.databinding.internal.ValueBinding.<init>(ValueBinding.java:112) at Snippet.main(Snippet.java:32) Attaching patch...
bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/internal/ValueBinding.java
}
	
	/* (non-Javadoc)
	 * @see org.eclipse.jface.internal.databinding.provisional.Binding#dispose()
	 */
	public void dispose() {
		target.removeValueChangeListener(targetChangeListener);
		if (target instanceof IVetoableValue) {
			((IVetoableValue) target)
					.removeValueChangingListener(targetChangingListener);
		}
		model.removeValueChangeListener(modelChangeListener);
		super.dispose();
	}
	
	private final IValueChangingListener targetChangingListener = new IValueChangingListener() {
		public boolean handleValueChanging(IVetoableValue source, ValueDiff diff) {
			if (updating)
				return true;
			
			
			Object value = diff.getNewValue();
			ValidationError partialValidationError = targetValidator
					.isPartiallyValid(value);
			partialValidationErrorObservable.setValue(partialValidationError);
			return partialValidationError == null;
		}
	};
	private final IValueChangeListener targetChangeListener = new IValueChangeListener() {
		public void handleValueChange(IObservableValue source, ValueDiff diff) {