harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kevin Zhou (JIRA)" <j...@apache.org>
Subject [jira] Closed: (HARMONY-6160) [classlib][beans] java.beans.XMLEncoder.writeObject(Object o) should not change the inner content of the given object
Date Thu, 04 Jun 2009 05:08:07 GMT

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

Kevin Zhou closed HARMONY-6160.
-------------------------------


> [classlib][beans] java.beans.XMLEncoder.writeObject(Object o) should not change the inner
content of the given object
> ---------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-6160
>                 URL: https://issues.apache.org/jira/browse/HARMONY-6160
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>    Affects Versions: 5.0M9
>            Reporter: Kevin Zhou
>            Assignee: Tim Ellison
>             Fix For: 5.0M10
>
>         Attachments: HARMONY-6160.diff
>
>   Original Estimate: 48h
>  Remaining Estimate: 48h
>
> Given a test case [1], RI passes while HY.
> [1] Test Case:
> public class XMLEncoderTest extends TestCase {
>     public static class MockTreeMapInnerClass extends TreeMap {
>         @Override
>         public Object get(Object key) {
>             Object result = super.get(key);
>             if (result == null) {
>                 result = new TreeMap();
>                 put(key, result);
>             }
>             return result;
>         }
>     }
>     public void test_XMLEncoder_writeObject() {
>         Map<String, TreeMap<String, String>> innerTreeMap = new MockTreeMapInnerClass();
>         TreeMap resultTreeMap = innerTreeMap.get("outKey");
>         resultTreeMap.put("innerKey", "innerValue");
>         ByteArrayOutputStream baos = new ByteArrayOutputStream();
>         XMLEncoder xmlEncoder = new XMLEncoder(baos);
>         xmlEncoder.writeObject(innerTreeMap);
>         assertEquals(1, innerTreeMap.size());
>     }
> }

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