harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "spark shen (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-4486) [classlib][beans] Persistence delegate for swing classes are missing
Date Wed, 18 Jul 2007 08:44:04 GMT
[classlib][beans] Persistence delegate for swing classes are missing
--------------------------------------------------------------------

                 Key: HARMONY-4486
                 URL: https://issues.apache.org/jira/browse/HARMONY-4486
             Project: Harmony
          Issue Type: Improvement
          Components: Classlib
            Reporter: spark shen


The situation are similar as awt module. Many persistence delegates are not properly implemented
for swing package.The following test case will reveal this.
public void test_writeObject_javax_swing_Box() {
        ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
        XMLEncoder encoder = new XMLEncoder(new BufferedOutputStream(byteArrayOutputStream));
        Box box = new Box(1);
        box.setAlignmentX(12.21f);

        encoder.writeObject(box);
        encoder.close();
        DataInputStream stream = new DataInputStream(new ByteArrayInputStream(byteArrayOutputStream.toByteArray()));
        XMLDecoder decoder = new XMLDecoder(stream);
        Box aBox = (Box) decoder.readObject();
        assertEquals(box.getAlignmentX(), aBox.getAlignmentX());
    }

This test case passes on RI, but will throw NullPointerException on harmony.
The swing classes need special treatment are:
Box,
JFrame,
JTabbedPane,
DefaultComboBoxModel,
ToolTipManager

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message