private void readObject(ObjectInputStream s) throws ClassNotFoundException,
            IOException {
        s.defaultReadObject();

        Object listenerOrNull;
        while (null != (listenerOrNull = s.readObject())) {
            if (listenerOrNull instanceof PropertyChangeListener) {
                addPropertyChangeListener((PropertyChangeListener) listenerOrNull);
            } else if (listenerOrNull instanceof VetoableChangeListener) {
                addVetoableChangeListener((VetoableChangeListener) listenerOrNull);
            }
        }
    }