Couldn't this be `oldValues.put(key, oldValue);`?