harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paulex Yang (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-349) The currency field of DecimalFormatSymbols is not deserialized properly
Date Thu, 20 Apr 2006 04:02:41 GMT
    [ http://issues.apache.org/jira/browse/HARMONY-349?page=comments#action_12375236 ] 

Paulex Yang commented on HARMONY-349:
-------------------------------------

Looks fine, thank you, George. 

But there is an issue to run test within Eclipse. pls. see my reply to dev-list for details.

>  The currency field of DecimalFormatSymbols is not deserialized properly
> ------------------------------------------------------------------------
>
>          Key: HARMONY-349
>          URL: http://issues.apache.org/jira/browse/HARMONY-349
>      Project: Harmony
>         Type: Bug

>   Components: Classlib
>     Reporter: Paulex Yang
>     Assignee: George Harley
>  Attachments: 02.JIRA349_text.zip
>
> According to the serialized form of DecimalFormatSymbols, the DecimalFormatSymbols itself
should be responsible for initializing the currency from the intlCurrencySymbol field. But
Harmony only leave it as null.  
> The following test case reproduces this bug:
> 	public void test_serialization() {
> 		DecimalFormatSymbols symbols = new DecimalFormatSymbols(Locale.FRANCE);
> 		Currency currency = symbols.getCurrency();
> 		assertNotNull(currency);
> 		try {
> 			// serialize
> 			ByteArrayOutputStream byteOStream = new ByteArrayOutputStream();
> 			ObjectOutputStream objectOStream = new ObjectOutputStream(
> 					byteOStream);
> 			objectOStream.writeObject(symbols);
> 			// and deserialize
> 			ObjectInputStream objectIStream = new ObjectInputStream(
> 					new ByteArrayInputStream(byteOStream.toByteArray()));
> 			DecimalFormatSymbols symbolsD = (DecimalFormatSymbols) objectIStream
> 					.readObject();
> 			
> 			// The associated currency will not persist
> 			currency = symbolsD.getCurrency();
> 		} catch (Exception e1) {
> 			fail("Errors occur during serialization");
> 		}
> 		try {
> 			assertNotNull(currency);
> 		} catch (Exception e) {
> 			fail("currency should not be null");
> 		}
> 	}
> Pass on RI(Sun JDK1.5.0_06)
> Rail on Harmony

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message