You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "spark shen (JIRA)" <ji...@apache.org> on 2007/07/19 09:00:25 UTC

[jira] Closed: (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 ]

spark shen closed HARMONY-4487.
-------------------------------


Verified at r557505. Thanks

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