/** * Resolves deserialized object. Overrides superclass method. Adds checking * for object validity. In case this object is invalid * throws {@link java.io.InvalidObjectException InvalidObjectException}. * @throws ObjecStreamException When problem during serialization occures. * @throws InvalidObjectException When deserialized <code>CloneableEditor</code> * is invalid and shouldn't be used. */ protected Object readResolve() throws ObjectStreamException { if (discard()) { throw new java.io.InvalidObjectException("Deserialized component is invalid: " + this); // NOI18N } else { initializeBySupport(); return this; } }