[ https://issues.apache.org/jira/browse/HARMONY-6160?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Tim Ellison reassigned HARMONY-6160:
------------------------------------
Assignee: Tim Ellison
> [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.
|