You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Leo Li (JIRA)" <ji...@apache.org> on 2007/07/19 07:52:05 UTC
[jira] Assigned: (HARMONY-4487) [classlib][beans] Persistence
delegate for j.u.Map is missing
[ https://issues.apache.org/jira/browse/HARMONY-4487?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Leo Li reassigned HARMONY-4487:
-------------------------------
Assignee: Leo Li
> [classlib][beans] Persistence delegate for j.u.Map is missing
> -------------------------------------------------------------
>
> Key: HARMONY-4487
> URL: https://issues.apache.org/jira/browse/HARMONY-4487
> Project: Harmony
> Issue Type: Improvement
> Components: Classlib
> Reporter: spark shen
> Assignee: Leo Li
> Attachments: HY-4478.patch, HY-4487.sh
>
>
> Following test case will pass on RI, but fail on Harmony.
> public void test_writeObject_java_util_Map(){
> ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
> XMLEncoder encoder = new XMLEncoder(new BufferedOutputStream(
> byteArrayOutputStream));
> TreeMap<Integer, String> map = new TreeMap<Integer, String>();
> map.put(new Integer(10), "first element");
> encoder.writeObject(map);
> encoder.close();
> DataInputStream stream = new DataInputStream(new ByteArrayInputStream(
> byteArrayOutputStream.toByteArray()));
> XMLDecoder decoder = new XMLDecoder(stream);
> TreeMap aMap = (TreeMap) decoder.readObject();
> assertEquals(map.size(), aMap.size());
> assertEquals(map.get(10), aMap.get(10));
> }
> A persistence delegate for Map class should be added to fix this bug.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.