Bug 15844 [Exception Handling] SelectionChange events and NPE
Build 20020508 Due to new global actions there are now more objects listening to selection changes send out by a JFace viewer. We now had the case that one of the listener generated a NPE. As a result all listeners registered after that one didn't receive the selection change event. StructuredViewers should be more fault tolorant to exceptions when informing listeners.
bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/Viewer.java
System.arraycopy(keys, 0, newKeys, 0, index);
			System.arraycopy(keys, index + 1, newKeys, index, newKeys.length - index);
			System.arraycopy(values, 0, newValues, 0, index);
			System.arraycopy(values, index + 1, newValues, index, newValues.length - index);
			keys = newKeys;
			values = newValues;
		}
		return;
	}
	
	
	if (keys == null) {
		keys = new String[] {key};
		values = new Object[] {value};
		return;
	}
	for (int i=0; i < keys.length; i++) {
		if (keys [i].equals(key)) {
			values [i] = value;
			return;
		}
	}
	String [] newKeys = new String[keys.length + 1];
	Object [] newValues = new Object[values.length + 1];
	System.arraycopy(keys, 0, newKeys, 0, keys.length);
	System.arraycopy(values, 0, newValues, 0, values.length);
	newKeys [keys.length] = key;
	newValues [values.length] = value;
	keys = newKeys;
	values = newValues;