Bug 320162 E4CommandProcessor.createBinding catch IllegalArgumentException which is never thrown
The code looks like this: TriggerSequence sequence = null; try { sequence = bs.createSequence(keySequence); } catch (IllegalArgumentException ex) { // the sequence is not complete Activator.trace(Policy.DEBUG_MENUS, "failed to create: " + binding, ex); //$NON-NLS-1$ return null; } But when looking at code in KeySequence.getInstance the only Exceptions thrown are: * NPE * ParseException (catched in BindingServiceImpl) I guess the code should catch the NPE and not the never thrown IAE
bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/internal/workbench/E4CommandProcessor.java
if (UIEvents.KeyBinding.COMMAND.equals(attrName)) {
							MKeyBinding oldBinding = (MKeyBinding) EcoreUtil
									.copy((EObject) binding);
							oldBinding.setCommand((MCommand) oldObj);
							updateBinding(cs, bs, manager, bindingTables, oldBinding, false);
							updateBinding(cs, bs, manager, bindingTables, binding, true);
						} else if (UIEvents.KeySequence.KEYSEQUENCE.equals(attrName)) {
							MKeyBinding oldBinding = (MKeyBinding) EcoreUtil
									.copy((EObject) binding);
							oldBinding.setKeySequence((String) oldObj);
							updateBinding(cs, bs, manager, bindingTables, oldBinding, false);
							updateBinding(cs, bs, manager, bindingTables, binding, true);
						}
					} else if (UIEvents.KeyBinding.PARAMETERS.equals(attrName)) {
						if (UIEvents.EventTypes.ADD.equals(event
								.getProperty(UIEvents.EventTags.TYPE))) {
							Object newObj = event.getProperty(UIEvents.EventTags.NEW_VALUE);
							MKeyBinding oldBinding = (MKeyBinding) EcoreUtil
									.copy((EObject) binding);
							oldBinding.getParameters().remove(newObj);
							updateBinding(cs, bs, manager, bindingTables, oldBinding, false);
							updateBinding(cs, bs, manager, bindingTables, binding, true);
						} else if (UIEvents.EventTypes.REMOVE.equals(event
								.getProperty(UIEvents.EventTags.TYPE))) {
							Object oldObj = event.getProperty(UIEvents.EventTags.OLD_VALUE);
							MKeyBinding oldBinding = (MKeyBinding) EcoreUtil
									.copy((EObject) binding);
							oldBinding.getParameters().add((MParameter) oldObj);
							updateBinding(cs, bs, manager, bindingTables, oldBinding, false);
							updateBinding(cs, bs, manager, bindingTables, binding, true);