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] Updated: (HARMONY-4473) [classlib][beans] Current bean implementation does not persist awt.Choice properly
Date Tue, 17 Jul 2007 06:39:04 GMT

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

spark shen updated HARMONY-4473:
--------------------------------

    Description: 
The following test case will throw StackOverflowError on Harmony but pass on RI:
public void test_writeObject_java_awt_Choice() {
        ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
        XMLEncoder encoder = new XMLEncoder(new BufferedOutputStream(
            byteArrayOutputStream));
        Choice choice = new Choice();

        encoder.writeObject(choice);
        encoder.close();

        DataInputStream stream = new DataInputStream(new ByteArrayInputStream(
                byteArrayOutputStream.toByteArray()));
        XMLDecoder decoder = new XMLDecoder(stream);
        Choice aChoice = (Choice) decoder.readObject();
        assertEquals(choice.getFocusTraversalKeysEnabled(), aChoice
                .getFocusTraversalKeysEnabled());
    }

Besides Choice, the awt classes need special treatment are:
SystemColor,
TextAttribute,
MenuShortcut,
awt.Component,
awt.Container,
Menu,
MenuBar,
awt.List,
BorderLayout,
CardLayout,
GridLayout,
Insets,
Point,
ScrollPane

  was:
The following test case will fail on Harmony but pass on RI:
public void test_writeObject_java_awt_SystemColor() {
        ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
        XMLEncoder encoder = new XMLEncoder(new BufferedOutputStream(
            byteArrayOutputStream));

        encoder.writeObject(SystemColor.activeCaption);
        encoder.close();
        DataInputStream stream = new DataInputStream(new ByteArrayInputStream(
                byteArrayOutputStream.toByteArray()));
        XMLDecoder decoder = new XMLDecoder(stream);
        SystemColor color = (SystemColor) decoder.readObject();
        assertEquals(SystemColor.activeCaption, color);
    }

Seems that many persistence delegates for awt package are not implemented. I will add them.
The awt classes need special treatment are:
SystemColor,
TextAttribute,
MenuShortcut,
awt.Component,
awt.Container,
Choice,
Menu,
MenuBar,
awt.List,
BorderLayout,
CardLayout,
GridLayout,
Insets,
Point,
ScrollPane


> [classlib][beans] Current bean implementation does not persist awt.Choice properly
> ----------------------------------------------------------------------------------
>
>                 Key: HARMONY-4473
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4473
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: spark shen
>            Assignee: Tony Wu
>         Attachments: HY-4473.patch
>
>
> The following test case will throw StackOverflowError on Harmony but pass on RI:
> public void test_writeObject_java_awt_Choice() {
>         ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
>         XMLEncoder encoder = new XMLEncoder(new BufferedOutputStream(
>             byteArrayOutputStream));
>         Choice choice = new Choice();
>         encoder.writeObject(choice);
>         encoder.close();
>         DataInputStream stream = new DataInputStream(new ByteArrayInputStream(
>                 byteArrayOutputStream.toByteArray()));
>         XMLDecoder decoder = new XMLDecoder(stream);
>         Choice aChoice = (Choice) decoder.readObject();
>         assertEquals(choice.getFocusTraversalKeysEnabled(), aChoice
>                 .getFocusTraversalKeysEnabled());
>     }
> Besides Choice, the awt classes need special treatment are:
> SystemColor,
> TextAttribute,
> MenuShortcut,
> awt.Component,
> awt.Container,
> Menu,
> MenuBar,
> awt.List,
> BorderLayout,
> CardLayout,
> GridLayout,
> Insets,
> Point,
> ScrollPane

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