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.
Summary: | Serialize and Serialize As actions in the Customize dialog throw an exception | ||
---|---|---|---|
Product: | platform | Reporter: | Jan Palka <janpalka> |
Component: | -- Other -- | Assignee: | Jaroslav Tulach <jtulach> |
Status: | CLOSED INVALID | ||
Severity: | normal | ||
Priority: | P4 | ||
Version: | 3.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: |
Description
Jan Palka
2000-01-21 01:05:55 UTC
Duplicated with #5719 Priority is changed to P4 (normal). 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. I checked this bug in the latest build and it looks like fixed, however it is still appears in FFJ 2.0 |