This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 5485 - Serialize and Serialize As actions in the Customize dialog throw an exception
Summary: Serialize and Serialize As actions in the Customize dialog throw an exception
Status: CLOSED INVALID
Alias: None
Product: platform
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 3.x
Hardware: All All
: P4 normal (vote)
Assignee: Jaroslav Tulach
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2000-01-21 01:05 UTC by Jan Palka
Modified: 2008-12-23 10:51 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Palka 2000-01-21 01:05:55 UTC
I do not know how to obtain the exception.  Only message box with a generic message (Exception occured ..) is shown.

[jglick] see #5719 also
Comment 1 Jaroslav Tulach 2000-06-28 15:25:59 UTC
Duplicated with #5719
Comment 2 Marek Grummich 2000-07-25 09:43:59 UTC
Priority is changed to P4 (normal).
Comment 3 Ivana Ladenbergerova 2001-01-25 15:15:59 UTC
comment from the user laurent.sauvage@forlog.fr


In Bean Customizer:
The Serialize As command fails to serialize a bean.
This because there's a PropertyChangeListener (probably Bean Customizer itself)
in the PropertyChangeSupport listener list that isn't serializable.
Imagine a bean extending standard JButton.
Because of PropertyChangeSupport changeSupport is not transient in Component.
All PropertyChangeListener must be serialized.

Sample failing code:
import java.beans.*;
import java.io.*;
import javax.swing.JButton;

public class ProgressionButton extends JButton implements java.io.Serializable {


    /** Creates new ProgressionButton */
    public ProgressionButton() {
    }

    public void addPropertyChangeListener(PropertyChangeListener listener)
    {
        super.addPropertyChangeSupport(listener);
    }
    public void removePropertyChangeListener(PropertyChangeListener listener)
    {
       super.removePropertyChangeSupport(listener);
    }
}
********************
this code fails to be serialized using BeanCustomizer.
simply put in comments calls to super methods so the ProgressionButton can be
serialized.
Comment 4 skmajji 2001-01-25 19:27:59 UTC
I checked this bug in the latest build and it looks like fixed, however it is
still appears in FFJ 2.0