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-4487) [classlib][beans] Persistence delegate for j.u.Map is missing
Date Thu, 19 Jul 2007 05:50:05 GMT

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

spark shen updated HARMONY-4487:
--------------------------------

    Attachment: HY-4487.sh

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


Mime
View raw message