You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Tony Wu (JIRA)" <ji...@apache.org> on 2007/07/20 10:08:06 UTC

[jira] Assigned: (HARMONY-4486) [classlib][beans] Persistence delegate for swing classes are missing

     [ https://issues.apache.org/jira/browse/HARMONY-4486?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tony Wu reassigned HARMONY-4486:
--------------------------------

    Assignee: Tony Wu

> [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
>            Assignee: Tony Wu
>         Attachments: HY-4486.patch, HY-4486.sh
>
>
> 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.