harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tony Wu (JIRA)" <j...@apache.org>
Subject [jira] Assigned: (HARMONY-4486) [classlib][beans] Persistence delegate for swing classes are missing
Date Fri, 20 Jul 2007 08:08:06 GMT

     [ 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.


Mime
View raw message