Ticket #12797

Bean serialization is broken
Eröffnet am: 2008-06-18 06:19 Letztes Update: 2008-11-09 16:04

Auswertung:
Verantwortlicher:
Typ:
Status:
Offen [Owner assigned]
Komponente:
(Keine)
Meilenstein:
(Keine)
Priorität:
5 - Mittel
Schweregrad:
5 - Mittel
Lösung:
Accepted
Datei:
Keine

Details

This is in addition to the
interface.getClass().getMethods() bug.

Bean serialization does not work properly. Only the
object directly specified in writeObject is written,
even for classes such as JButton -- only <new
class="JButton" /> or something like that is written -
no properties etc.

The problem apparently occurs when the
PersistenceDelegate sees that streamCandidate (the new
uninitialized object it compares against to determinate
default values) is null (so mutatesTo is false), and
therefore calls instantiate instead of initialize.
However, instantiate only checks for constructor
properties, and doesn't bother with any other
properties. I think that this is how it is in Sun's
implementation, and I'm not sure where or how the other
properties are supposed to get written, and I haven't
tried Classpath on a PC, so I don't know where the
problem lies.

Ticket-Verlauf (2/2 Historien)

2008-11-06 22:35 Aktualisiert von: freebeans
  • Lösung Update from Keine to Accepted
  • Verantwortlicher Update from (Keine) to freebeans
2008-11-09 16:04 Aktualisiert von: freebeans
Kommentar
I'm investigating the cause of this problem.
And I found that "streamCandidate" always null, and DefaultPersistenceDelegate.initialize() never called.
The problem is not fixed yet, but I continue investigating.

Dateianhangliste

Keine Anhänge

Bearbeiten

Please login to add comment to this ticket » Anmelden