Object oldKey = e.nextElement(); Object newKey = getStaticAttribute(oldKey); Object key = (newKey == null) ? oldKey : newKey;
Object key = e.nextElement();  if (key instanceof Serializable)
  public static void writeAttributeSet(ObjectOutputStream out, AttributeSet a)    throws IOException  {    Enumeration e = a.getAttributeNames();    while (e.hasMoreElements())      {        Object oldKey = e.nextElement();        Object newKey = getStaticAttribute(oldKey);        Object key = (newKey == null) ? oldKey : newKey;         out.writeObject(key);        out.writeObject(a.getAttribute(oldKey));      }    out.writeObject(null);    out.writeObject(null);  }