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
final Context bindingContext = manager.getContext(bt.getBindingContextId());
						final BindingTable table = new BindingTable(bindingContext);
						bindingTables.addTable(table);
						List<MKeyBinding> bindings = bt.getBindings();
						for (MKeyBinding binding : bindings) {
							Binding keyBinding = createBinding(bindingContext, cs, bs,
									binding.getCommand(), binding.getParameters(),
									binding.getKeySequence(), binding);
							if (keyBinding != null) {
								table.addBinding(keyBinding);
							}
						}
					}
				} else if (elementObj instanceof MBindingTable) {
					Object newObj = event.getProperty(UIEvents.EventTags.NEW_VALUE);
					Object oldObj = event.getProperty(UIEvents.EventTags.OLD_VALUE);
					if (UIEvents.EventTypes.ADD.equals(event.getProperty(UIEvents.EventTags.TYPE))
							&& newObj instanceof MKeyBinding) {
						MKeyBinding binding = (MKeyBinding) newObj;
						updateBinding(cs, bs, manager, bindingTables, binding, true);
					} else if (UIEvents.EventTypes.REMOVE.equals(event
							.getProperty(UIEvents.EventTags.TYPE)) && oldObj instanceof MKeyBinding) {
						MKeyBinding binding = (MKeyBinding) oldObj;
						updateBinding(cs, bs, manager, bindingTables, binding, false);
					}
				} else if (elementObj instanceof MKeyBinding) {
					MKeyBinding binding = (MKeyBinding) elementObj;
					String attrName = (String) event.getProperty(UIEvents.EventTags.ATTNAME);
					if (UIEvents.EventTypes.SET.equals(event.getProperty(UIEvents.EventTags.TYPE))) {
						Object oldObj = event.getProperty(UIEvents.EventTags.OLD_VALUE);