Object old; if (value != null) old = super.put(key, value); else old = super.remove(key);
Object old = checkAndPut(key, value);
  public Object put(Object key, Object value)  {    Object old;    if (value != null)      old = super.put(key, value);    else      old = super.remove(key);    if (key instanceof String && old != value)      firePropertyChange((String) key, old, value);    return old;  }