Bug 135316 [DataBinding] Unexpected behavior from BindSpec converter and validator setters
The set methods that accept one validator/converter don't behave as expected. For example if setValidators(...) was called with 2 validators and then setValidator(...) was called it would only change the first validator stored internally. The validator that previously was set at index 1 in the array is still maintained by BindSpec. Also the setValidator(...) method always assumes that an array with at least a length of 1 exists. If setValidators(...) is called with an array of length zero and then a call is made to setValidator(...) an IndexOutOfBoundsException is thrown. Same problems would occur with setting it to null except of course a NPE will be thrown. When I get some time I'll try to apply a patch for this. The changes that I'll make will be that when any set is called it removes all previous values.
tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/BindingTestSuite.java
import org.eclipse.jface.tests.internal.databinding.internal.viewers.SVOCWLTest;
import org.eclipse.jface.tests.internal.databinding.internal.viewers.SelectionProviderSingleSelectionObservableValueTest;
import org.eclipse.jface.tests.internal.databinding.provisional.observable.AbstractObservableTest;
import org.eclipse.jface.tests.internal.databinding.provisional.viewers.ViewersObservableFactoryTest;
public class BindingTestSuite extends TestSuite {
	public static void main(String[] args) {
		junit.textui.TestRunner.run(suite());
	}
	public static Test suite() {
		return new BindingTestSuite();
	}
	public BindingTestSuite() {
		addTestSuite(ObservableTest.class);
		addTestSuite(JavaBeansScalarObservableValueFactoryTest.class);
		addTestSuite(DatabindingContextTest.class);
		addTestSuite(DefaultBindSupportFactoryTest.class);
		addTestSuite(IDiffsTest.class);
		
		addTestSuite(SelectionAwareObservableCollectionTest.class);
		addTest(BindingScenariosTestSuite.suite());
		addTestSuite(DefaultBindSupportFactoryIntTest.class);
		addTestSuite(DefaultBindSupportFactoryDoublePrimitiveTest.class);
		addTestSuite(DefaultBindSupportFactoryBytePrimitiveTest.class);
		addTestSuite(DefaultBindSupportFactoryLongPrimitiveTest.class);
		addTestSuite(DefaultBindSupportFactoryShortPrimitiveTest.class);
		addTestSuite(DefaultBindSupportFactoryBooleanPrimitiveTest.class);
		addTestSuite(DefaultBindSupportFactoryFloatPrimitiveTest.class);
		addTestSuite(ObjectToPrimitiveValidatorTest.class);
		addTestSuite(IdentityConverterTest.class);
		addTestSuite(LazyListBindingTest.class);