Bug 225425 [DataBinding] Load of known null value in CompositeMap
Found by FindBugs: line 232 The variable referenced at this point is known to be null due to an earlier check against null. Although this is valid, it might be a mistake (perhaps you intended to refer to a different variable, or perhaps the earlier check to see if the variable is null should have been a check to see if it was nonnull). I don't know what the proper fix would be at this point. We also have a bug in Snippet017TableViewerWithDerivedColumns, or in CompositeMap: - start Snippet017 - select "Della Duck" - change Mother to: "Downy O'Drake" expected: Grandmother column for Della Duck changes to "unknown" actual: Grandmother column for Della Duck remains "Downy O'Drake"
bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/map/CompositeMap.java
Object newValue = diff.getNewValue(addedKey);
				if (pendingChanges.containsKey(addedKey)) {
					Object oldKey = pendingChanges.remove(addedKey);
					Object oldValue;
					if (removedKeys.remove(oldKey)) {
						oldValue = diff.getOldValue(oldKey);
					} else {
						oldValue = secondMap.get(oldKey);
					}
					pendingChanges.remove(oldKey);
					pendingAdds.remove(addedKey);
					pendingRemoves.remove(oldKey);
					for (Iterator it2 = elements.iterator(); it2.hasNext();) {
						Object element = it2.next();
						changes.add(element);
						oldValues.put(element, oldValue);
						newValues.put(element, newValue);
						wrappedMap.put(element, newValue);
					}
				} else if (pendingAdds.remove(addedKey)) {
					for (Iterator it2 = elements.iterator(); it2.hasNext();) {
						Object element = it2.next();
						adds.add(element);
						newValues.put(element, newValue);
						wrappedMap.put(element, newValue);
					}
				} else {
					Assert.isTrue(false, "unexpected case"); 
				}
			}