You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Paulex Yang (JIRA)" <ji...@apache.org> on 2006/04/14 13:54:00 UTC

[jira] Created: (HARMONY-349) The currency field of DecimalFormatSymbols is not deserialized properly

 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


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


[jira] Closed: (HARMONY-349) The currency field of DecimalFormatSymbols is not deserialized properly

Posted by "George Harley (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-349?page=all ]
     
George Harley closed HARMONY-349:
---------------------------------


Verified by Paulex. Eclipse IDE metadata changed in relation to this.

>  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


Re: Classpath setting for Eclipse(was Re: [jira] Resolved: (HARMONY-349) The currency field of DecimalFormatSymbols is not deserialized properly)

Posted by Paulex Yang <pa...@gmail.com>.
Great, it works!

I modified the line below of the .classpath
    <classpathentry kind="output" path="bin"/>

to
    <classpathentry kind="output" path="bin/main"/>

And now it is OK. 


George Harley wrote:
> Paulex Yang wrote:
>> Well, George, you caught me;)
>>
>> I tried your solution on TEXT module at first, but for some unknown 
>> reasons, Eclipse refused to compile according to the modification and 
>> outputs:
>>
>> "Cannot nest output folder 'text/bin/main' inside output folder 
>> 'text/bin' "
>
> Hi Paulex,
>
> Just a hunch, but is "text/bin" the default output folder for your 
> Eclipse project ? If so then could you change that default value to be 
> "text/bin/main" and see if the Eclipse compile error is still there ?
>
> Thanks,
> George
>
>>
>> I have no idea what happened, so I took a shortcut to walk around.  
>> My environment is Eclipse 3.2 M5 on WinXP
>>
>> If this issue can be resolved, I'm fine to output them directly to 
>> existing bin/test directory.
>>
>>
>> George Harley wrote:
>>> Hi Paulex,
>>>
>>> Adding new Eclipse source folders to a module to cater for the 
>>> resources sounds good to me, but I don't understand the need to have 
>>> their output go to new sub-folders under bin. Why not just have test 
>>> resources go under the existing bin/test and main resources go under 
>>> bin/main like this ...
>>>
>>> <classpathentry output="bin/test" kind="src" 
>>> path="src/test/resources"/>
>>> <classpathentry output="bin/main" kind="src" 
>>> path="src/main/resources"/>
>>>
>>>
>>> Best regards,
>>> George
>>>
>>>
>>> Paulex Yang wrote:
>>>> Recently we have agreed to put the serialization data file to the 
>>>> <module>/test/resources/serialization directory, but which requires 
>>>> Eclipse user additional setting to run serialization tests. To 
>>>> handle this issue, I propose to add the following lines to 
>>>> .classpath file of each module as below, so that the files in 
>>>> resources directory can be built into default classpath. Comments?
>>>>
>>>>    <classpathentry output="bin/resources/test" kind="src" 
>>>> path="src/test/resources"/>
>>>>    <classpathentry output="bin/resources/main" kind="src" 
>>>> path="src/main/resources"/>
>>>>
>>>> George Harley (JIRA) wrote:
>>>>>      [ http://issues.apache.org/jira/browse/HARMONY-349?page=all ]
>>>>>      George Harley resolved HARMONY-349:
>>>>> -----------------------------------
>>>>>
>>>>>     Resolution: Fixed
>>>>>
>>>>> Hi Paulex,
>>>>> Changes committed in revision 395251. I made a couple of 
>>>>> modifications to the supplied test case to enable it to load the 
>>>>> .ser file from the system classloader. In addition I put the .ser 
>>>>> into the modules/text/src/test/resources/serialization/java/text 
>>>>> location and updated the build.xml with a new copy.test.resources 
>>>>> target so that this .ser file (and eventually others like it) make 
>>>>> it onto the runtime classpath.
>>>>> Please could you confirm if this version of your patch has been 
>>>>> applied to your satisfaction.
>>>>> Thanks for this enhancement, George
>>>>>
>>>>>  
>>>>>>  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
>>>>>>     
>>>>>
>>>>>   
>>>>
>>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> Terms of use : http://incubator.apache.org/harmony/mailing.html
>>> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
>>> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
>>>
>>>
>>
>>
>
>
> ---------------------------------------------------------------------
> Terms of use : http://incubator.apache.org/harmony/mailing.html
> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
>
>


-- 
Paulex Yang
China Software Development Lab
IBM



---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Re: Classpath setting for Eclipse(was Re: [jira] Resolved: (HARMONY-349) The currency field of DecimalFormatSymbols is not deserialized properly)

Posted by Paulex Yang <pa...@gmail.com>.
George Harley wrote:
> Paulex Yang wrote:
>> George Harley wrote:
>>> Hi Paulex,
>>>
>>> I pressed "send" a bit too soon there. This is the sort of classpath 
>>> set up I was referring to in the previous message. Please note the 
>>> bottom "classpathentry" element which I think specifies the default 
>>> output folder for a project.
>>>
>>>    <classpathentry output="bin/main" kind="src" path="src/main/java"/>
>>>    <classpathentry output="bin/test" kind="src" 
>>> path="src/test/resources"/>
>>>    <classpathentry output="bin/main" kind="src" 
>>> path="src/main/resources"/>
>>>    <classpathentry output="bin/test" kind="src" path="src/test/java"/>
>>>    <classpathentry kind="output" path="bin/main"/>
>>>
>> I pressed too soon, too;)
>>
>> It's exactly what my .classpath now looks like, it works well for me.
>
>
> That's great ! I'll move to close out the JIRA issues related to this 
> now (that's 334, 338 and 339).
Well, how about update all the .classpath in SVN, too? ;-)
>
> Best regards,
> George
>
>
>>>
>>> Please let us know how it goes.
>>>
>>> Best regards,
>>> George
>>>
>>>
>>> George Harley wrote:
>>>> Paulex Yang wrote:
>>>>> Well, George, you caught me;)
>>>>>
>>>>> I tried your solution on TEXT module at first, but for some 
>>>>> unknown reasons, Eclipse refused to compile according to the 
>>>>> modification and outputs:
>>>>>
>>>>> "Cannot nest output folder 'text/bin/main' inside output folder 
>>>>> 'text/bin' "
>>>>
>>>> Hi Paulex,
>>>>
>>>> Just a hunch, but is "text/bin" the default output folder for your 
>>>> Eclipse project ? If so then could you change that default value to 
>>>> be "text/bin/main" and see if the Eclipse compile error is still 
>>>> there ?
>>>>
>>>> Thanks,
>>>> George
>>>>
>>>>>
>>>>> I have no idea what happened, so I took a shortcut to walk 
>>>>> around.  My environment is Eclipse 3.2 M5 on WinXP
>>>>>
>>>>> If this issue can be resolved, I'm fine to output them directly to 
>>>>> existing bin/test directory.
>>>>>
>>>>>
>>>>> George Harley wrote:
>>>>>> Hi Paulex,
>>>>>>
>>>>>> Adding new Eclipse source folders to a module to cater for the 
>>>>>> resources sounds good to me, but I don't understand the need to 
>>>>>> have their output go to new sub-folders under bin. Why not just 
>>>>>> have test resources go under the existing bin/test and main 
>>>>>> resources go under bin/main like this ...
>>>>>>
>>>>>> <classpathentry output="bin/test" kind="src" 
>>>>>> path="src/test/resources"/>
>>>>>> <classpathentry output="bin/main" kind="src" 
>>>>>> path="src/main/resources"/>
>>>>>>
>>>>>>
>>>>>> Best regards,
>>>>>> George
>>>>>>
>>>>>>
>>>>>> Paulex Yang wrote:
>>>>>>> Recently we have agreed to put the serialization data file to 
>>>>>>> the <module>/test/resources/serialization directory, but which 
>>>>>>> requires Eclipse user additional setting to run serialization 
>>>>>>> tests. To handle this issue, I propose to add the following 
>>>>>>> lines to .classpath file of each module as below, so that the 
>>>>>>> files in resources directory can be built into default 
>>>>>>> classpath. Comments?
>>>>>>>
>>>>>>>    <classpathentry output="bin/resources/test" kind="src" 
>>>>>>> path="src/test/resources"/>
>>>>>>>    <classpathentry output="bin/resources/main" kind="src" 
>>>>>>> path="src/main/resources"/>
>>>>>>>
>>>>>>> George Harley (JIRA) wrote:
>>>>>>>>      [ http://issues.apache.org/jira/browse/HARMONY-349?page=all ]
>>>>>>>>      George Harley resolved HARMONY-349:
>>>>>>>> -----------------------------------
>>>>>>>>
>>>>>>>>     Resolution: Fixed
>>>>>>>>
>>>>>>>> Hi Paulex,
>>>>>>>> Changes committed in revision 395251. I made a couple of 
>>>>>>>> modifications to the supplied test case to enable it to load 
>>>>>>>> the .ser file from the system classloader. In addition I put 
>>>>>>>> the .ser into the 
>>>>>>>> modules/text/src/test/resources/serialization/java/text 
>>>>>>>> location and updated the build.xml with a new 
>>>>>>>> copy.test.resources target so that this .ser file (and 
>>>>>>>> eventually others like it) make it onto the runtime classpath.
>>>>>>>> Please could you confirm if this version of your patch has been 
>>>>>>>> applied to your satisfaction.
>>>>>>>> Thanks for this enhancement, George
>>>>>>>>
>>>>>>>>  
>>>>>>>>>  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
>>>>>>>>>     
>>>>>>>>
>>>>>>>>   
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --------------------------------------------------------------------- 
>>>>>>
>>>>>> Terms of use : http://incubator.apache.org/harmony/mailing.html
>>>>>> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
>>>>>> For additional commands, e-mail: 
>>>>>> harmony-dev-help@incubator.apache.org
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> Terms of use : http://incubator.apache.org/harmony/mailing.html
>>> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
>>> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
>>>
>>>
>>
>>
>
>
> ---------------------------------------------------------------------
> Terms of use : http://incubator.apache.org/harmony/mailing.html
> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
>
>


-- 
Paulex Yang
China Software Development Lab
IBM



---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Re: Classpath setting for Eclipse(was Re: [jira] Resolved: (HARMONY-349) The currency field of DecimalFormatSymbols is not deserialized properly)

Posted by George Harley <ge...@googlemail.com>.
Paulex Yang wrote:
> George Harley wrote:
>> Hi Paulex,
>>
>> I pressed "send" a bit too soon there. This is the sort of classpath 
>> set up I was referring to in the previous message. Please note the 
>> bottom "classpathentry" element which I think specifies the default 
>> output folder for a project.
>>
>>    <classpathentry output="bin/main" kind="src" path="src/main/java"/>
>>    <classpathentry output="bin/test" kind="src" 
>> path="src/test/resources"/>
>>    <classpathentry output="bin/main" kind="src" 
>> path="src/main/resources"/>
>>    <classpathentry output="bin/test" kind="src" path="src/test/java"/>
>>    <classpathentry kind="output" path="bin/main"/>
>>
> I pressed too soon, too;)
>
> It's exactly what my .classpath now looks like, it works well for me.


That's great ! I'll move to close out the JIRA issues related to this 
now (that's 334, 338 and 339).

Best regards,
George


>>
>> Please let us know how it goes.
>>
>> Best regards,
>> George
>>
>>
>> George Harley wrote:
>>> Paulex Yang wrote:
>>>> Well, George, you caught me;)
>>>>
>>>> I tried your solution on TEXT module at first, but for some unknown 
>>>> reasons, Eclipse refused to compile according to the modification 
>>>> and outputs:
>>>>
>>>> "Cannot nest output folder 'text/bin/main' inside output folder 
>>>> 'text/bin' "
>>>
>>> Hi Paulex,
>>>
>>> Just a hunch, but is "text/bin" the default output folder for your 
>>> Eclipse project ? If so then could you change that default value to 
>>> be "text/bin/main" and see if the Eclipse compile error is still 
>>> there ?
>>>
>>> Thanks,
>>> George
>>>
>>>>
>>>> I have no idea what happened, so I took a shortcut to walk around.  
>>>> My environment is Eclipse 3.2 M5 on WinXP
>>>>
>>>> If this issue can be resolved, I'm fine to output them directly to 
>>>> existing bin/test directory.
>>>>
>>>>
>>>> George Harley wrote:
>>>>> Hi Paulex,
>>>>>
>>>>> Adding new Eclipse source folders to a module to cater for the 
>>>>> resources sounds good to me, but I don't understand the need to 
>>>>> have their output go to new sub-folders under bin. Why not just 
>>>>> have test resources go under the existing bin/test and main 
>>>>> resources go under bin/main like this ...
>>>>>
>>>>> <classpathentry output="bin/test" kind="src" 
>>>>> path="src/test/resources"/>
>>>>> <classpathentry output="bin/main" kind="src" 
>>>>> path="src/main/resources"/>
>>>>>
>>>>>
>>>>> Best regards,
>>>>> George
>>>>>
>>>>>
>>>>> Paulex Yang wrote:
>>>>>> Recently we have agreed to put the serialization data file to the 
>>>>>> <module>/test/resources/serialization directory, but which 
>>>>>> requires Eclipse user additional setting to run serialization 
>>>>>> tests. To handle this issue, I propose to add the following lines 
>>>>>> to .classpath file of each module as below, so that the files in 
>>>>>> resources directory can be built into default classpath. Comments?
>>>>>>
>>>>>>    <classpathentry output="bin/resources/test" kind="src" 
>>>>>> path="src/test/resources"/>
>>>>>>    <classpathentry output="bin/resources/main" kind="src" 
>>>>>> path="src/main/resources"/>
>>>>>>
>>>>>> George Harley (JIRA) wrote:
>>>>>>>      [ http://issues.apache.org/jira/browse/HARMONY-349?page=all ]
>>>>>>>      George Harley resolved HARMONY-349:
>>>>>>> -----------------------------------
>>>>>>>
>>>>>>>     Resolution: Fixed
>>>>>>>
>>>>>>> Hi Paulex,
>>>>>>> Changes committed in revision 395251. I made a couple of 
>>>>>>> modifications to the supplied test case to enable it to load the 
>>>>>>> .ser file from the system classloader. In addition I put the 
>>>>>>> .ser into the 
>>>>>>> modules/text/src/test/resources/serialization/java/text location 
>>>>>>> and updated the build.xml with a new copy.test.resources target 
>>>>>>> so that this .ser file (and eventually others like it) make it 
>>>>>>> onto the runtime classpath.
>>>>>>> Please could you confirm if this version of your patch has been 
>>>>>>> applied to your satisfaction.
>>>>>>> Thanks for this enhancement, George
>>>>>>>
>>>>>>>  
>>>>>>>>  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
>>>>>>>>     
>>>>>>>
>>>>>>>   
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> Terms of use : http://incubator.apache.org/harmony/mailing.html
>>>>> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
>>>>> For additional commands, e-mail: 
>>>>> harmony-dev-help@incubator.apache.org
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> Terms of use : http://incubator.apache.org/harmony/mailing.html
>> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
>> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
>>
>>
>
>


---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Re: Classpath setting for Eclipse(was Re: [jira] Resolved: (HARMONY-349) The currency field of DecimalFormatSymbols is not deserialized properly)

Posted by Paulex Yang <pa...@gmail.com>.
George Harley wrote:
> Hi Paulex,
>
> I pressed "send" a bit too soon there. This is the sort of classpath 
> set up I was referring to in the previous message. Please note the 
> bottom "classpathentry" element which I think specifies the default 
> output folder for a project.
>
>    <classpathentry output="bin/main" kind="src" path="src/main/java"/>
>    <classpathentry output="bin/test" kind="src" 
> path="src/test/resources"/>
>    <classpathentry output="bin/main" kind="src" 
> path="src/main/resources"/>
>    <classpathentry output="bin/test" kind="src" path="src/test/java"/>
>    <classpathentry kind="output" path="bin/main"/>
>
I pressed too soon, too;)

It's exactly what my .classpath now looks like, it works well for me.
>
> Please let us know how it goes.
>
> Best regards,
> George
>
>
> George Harley wrote:
>> Paulex Yang wrote:
>>> Well, George, you caught me;)
>>>
>>> I tried your solution on TEXT module at first, but for some unknown 
>>> reasons, Eclipse refused to compile according to the modification 
>>> and outputs:
>>>
>>> "Cannot nest output folder 'text/bin/main' inside output folder 
>>> 'text/bin' "
>>
>> Hi Paulex,
>>
>> Just a hunch, but is "text/bin" the default output folder for your 
>> Eclipse project ? If so then could you change that default value to 
>> be "text/bin/main" and see if the Eclipse compile error is still there ?
>>
>> Thanks,
>> George
>>
>>>
>>> I have no idea what happened, so I took a shortcut to walk around.  
>>> My environment is Eclipse 3.2 M5 on WinXP
>>>
>>> If this issue can be resolved, I'm fine to output them directly to 
>>> existing bin/test directory.
>>>
>>>
>>> George Harley wrote:
>>>> Hi Paulex,
>>>>
>>>> Adding new Eclipse source folders to a module to cater for the 
>>>> resources sounds good to me, but I don't understand the need to 
>>>> have their output go to new sub-folders under bin. Why not just 
>>>> have test resources go under the existing bin/test and main 
>>>> resources go under bin/main like this ...
>>>>
>>>> <classpathentry output="bin/test" kind="src" 
>>>> path="src/test/resources"/>
>>>> <classpathentry output="bin/main" kind="src" 
>>>> path="src/main/resources"/>
>>>>
>>>>
>>>> Best regards,
>>>> George
>>>>
>>>>
>>>> Paulex Yang wrote:
>>>>> Recently we have agreed to put the serialization data file to the 
>>>>> <module>/test/resources/serialization directory, but which 
>>>>> requires Eclipse user additional setting to run serialization 
>>>>> tests. To handle this issue, I propose to add the following lines 
>>>>> to .classpath file of each module as below, so that the files in 
>>>>> resources directory can be built into default classpath. Comments?
>>>>>
>>>>>    <classpathentry output="bin/resources/test" kind="src" 
>>>>> path="src/test/resources"/>
>>>>>    <classpathentry output="bin/resources/main" kind="src" 
>>>>> path="src/main/resources"/>
>>>>>
>>>>> George Harley (JIRA) wrote:
>>>>>>      [ http://issues.apache.org/jira/browse/HARMONY-349?page=all ]
>>>>>>      George Harley resolved HARMONY-349:
>>>>>> -----------------------------------
>>>>>>
>>>>>>     Resolution: Fixed
>>>>>>
>>>>>> Hi Paulex,
>>>>>> Changes committed in revision 395251. I made a couple of 
>>>>>> modifications to the supplied test case to enable it to load the 
>>>>>> .ser file from the system classloader. In addition I put the .ser 
>>>>>> into the modules/text/src/test/resources/serialization/java/text 
>>>>>> location and updated the build.xml with a new copy.test.resources 
>>>>>> target so that this .ser file (and eventually others like it) 
>>>>>> make it onto the runtime classpath.
>>>>>> Please could you confirm if this version of your patch has been 
>>>>>> applied to your satisfaction.
>>>>>> Thanks for this enhancement, George
>>>>>>
>>>>>>  
>>>>>>>  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
>>>>>>>     
>>>>>>
>>>>>>   
>>>>>
>>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> Terms of use : http://incubator.apache.org/harmony/mailing.html
>>>> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
>>>> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
>>>>
>>>>
>>>
>>>
>>
>>
>
>
> ---------------------------------------------------------------------
> Terms of use : http://incubator.apache.org/harmony/mailing.html
> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
>
>


-- 
Paulex Yang
China Software Development Lab
IBM



---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Re: Classpath setting for Eclipse(was Re: [jira] Resolved: (HARMONY-349) The currency field of DecimalFormatSymbols is not deserialized properly)

Posted by George Harley <ge...@googlemail.com>.
Hi Paulex,

I pressed "send" a bit too soon there. This is the sort of classpath set 
up I was referring to in the previous message. Please note the bottom 
"classpathentry" element which I think specifies the default output 
folder for a project.

    <classpathentry output="bin/main" kind="src" path="src/main/java"/>
    <classpathentry output="bin/test" kind="src" path="src/test/resources"/>
    <classpathentry output="bin/main" kind="src" path="src/main/resources"/>
    <classpathentry output="bin/test" kind="src" path="src/test/java"/>
    <classpathentry kind="output" path="bin/main"/>


Please let us know how it goes.

Best regards,
George


George Harley wrote:
> Paulex Yang wrote:
>> Well, George, you caught me;)
>>
>> I tried your solution on TEXT module at first, but for some unknown 
>> reasons, Eclipse refused to compile according to the modification and 
>> outputs:
>>
>> "Cannot nest output folder 'text/bin/main' inside output folder 
>> 'text/bin' "
>
> Hi Paulex,
>
> Just a hunch, but is "text/bin" the default output folder for your 
> Eclipse project ? If so then could you change that default value to be 
> "text/bin/main" and see if the Eclipse compile error is still there ?
>
> Thanks,
> George
>
>>
>> I have no idea what happened, so I took a shortcut to walk around.  
>> My environment is Eclipse 3.2 M5 on WinXP
>>
>> If this issue can be resolved, I'm fine to output them directly to 
>> existing bin/test directory.
>>
>>
>> George Harley wrote:
>>> Hi Paulex,
>>>
>>> Adding new Eclipse source folders to a module to cater for the 
>>> resources sounds good to me, but I don't understand the need to have 
>>> their output go to new sub-folders under bin. Why not just have test 
>>> resources go under the existing bin/test and main resources go under 
>>> bin/main like this ...
>>>
>>> <classpathentry output="bin/test" kind="src" 
>>> path="src/test/resources"/>
>>> <classpathentry output="bin/main" kind="src" 
>>> path="src/main/resources"/>
>>>
>>>
>>> Best regards,
>>> George
>>>
>>>
>>> Paulex Yang wrote:
>>>> Recently we have agreed to put the serialization data file to the 
>>>> <module>/test/resources/serialization directory, but which requires 
>>>> Eclipse user additional setting to run serialization tests. To 
>>>> handle this issue, I propose to add the following lines to 
>>>> .classpath file of each module as below, so that the files in 
>>>> resources directory can be built into default classpath. Comments?
>>>>
>>>>    <classpathentry output="bin/resources/test" kind="src" 
>>>> path="src/test/resources"/>
>>>>    <classpathentry output="bin/resources/main" kind="src" 
>>>> path="src/main/resources"/>
>>>>
>>>> George Harley (JIRA) wrote:
>>>>>      [ http://issues.apache.org/jira/browse/HARMONY-349?page=all ]
>>>>>      George Harley resolved HARMONY-349:
>>>>> -----------------------------------
>>>>>
>>>>>     Resolution: Fixed
>>>>>
>>>>> Hi Paulex,
>>>>> Changes committed in revision 395251. I made a couple of 
>>>>> modifications to the supplied test case to enable it to load the 
>>>>> .ser file from the system classloader. In addition I put the .ser 
>>>>> into the modules/text/src/test/resources/serialization/java/text 
>>>>> location and updated the build.xml with a new copy.test.resources 
>>>>> target so that this .ser file (and eventually others like it) make 
>>>>> it onto the runtime classpath.
>>>>> Please could you confirm if this version of your patch has been 
>>>>> applied to your satisfaction.
>>>>> Thanks for this enhancement, George
>>>>>
>>>>>  
>>>>>>  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
>>>>>>     
>>>>>
>>>>>   
>>>>
>>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> Terms of use : http://incubator.apache.org/harmony/mailing.html
>>> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
>>> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
>>>
>>>
>>
>>
>
>


---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Re: Classpath setting for Eclipse(was Re: [jira] Resolved: (HARMONY-349) The currency field of DecimalFormatSymbols is not deserialized properly)

Posted by George Harley <ge...@googlemail.com>.
Paulex Yang wrote:
> Well, George, you caught me;)
>
> I tried your solution on TEXT module at first, but for some unknown 
> reasons, Eclipse refused to compile according to the modification and 
> outputs:
>
> "Cannot nest output folder 'text/bin/main' inside output folder 
> 'text/bin' "

Hi Paulex,

Just a hunch, but is "text/bin" the default output folder for your 
Eclipse project ? If so then could you change that default value to be 
"text/bin/main" and see if the Eclipse compile error is still there ?

Thanks,
George

>
> I have no idea what happened, so I took a shortcut to walk around.  My 
> environment is Eclipse 3.2 M5 on WinXP
>
> If this issue can be resolved, I'm fine to output them directly to 
> existing bin/test directory.
>
>
> George Harley wrote:
>> Hi Paulex,
>>
>> Adding new Eclipse source folders to a module to cater for the 
>> resources sounds good to me, but I don't understand the need to have 
>> their output go to new sub-folders under bin. Why not just have test 
>> resources go under the existing bin/test and main resources go under 
>> bin/main like this ...
>>
>> <classpathentry output="bin/test" kind="src" path="src/test/resources"/>
>> <classpathentry output="bin/main" kind="src" path="src/main/resources"/>
>>
>>
>> Best regards,
>> George
>>
>>
>> Paulex Yang wrote:
>>> Recently we have agreed to put the serialization data file to the 
>>> <module>/test/resources/serialization directory, but which requires 
>>> Eclipse user additional setting to run serialization tests. To 
>>> handle this issue, I propose to add the following lines to 
>>> .classpath file of each module as below, so that the files in 
>>> resources directory can be built into default classpath. Comments?
>>>
>>>    <classpathentry output="bin/resources/test" kind="src" 
>>> path="src/test/resources"/>
>>>    <classpathentry output="bin/resources/main" kind="src" 
>>> path="src/main/resources"/>
>>>
>>> George Harley (JIRA) wrote:
>>>>      [ http://issues.apache.org/jira/browse/HARMONY-349?page=all ]
>>>>      George Harley resolved HARMONY-349:
>>>> -----------------------------------
>>>>
>>>>     Resolution: Fixed
>>>>
>>>> Hi Paulex,
>>>> Changes committed in revision 395251. I made a couple of 
>>>> modifications to the supplied test case to enable it to load the 
>>>> .ser file from the system classloader. In addition I put the .ser 
>>>> into the modules/text/src/test/resources/serialization/java/text 
>>>> location and updated the build.xml with a new copy.test.resources 
>>>> target so that this .ser file (and eventually others like it) make 
>>>> it onto the runtime classpath.
>>>> Please could you confirm if this version of your patch has been 
>>>> applied to your satisfaction.
>>>> Thanks for this enhancement, George
>>>>
>>>>  
>>>>>  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
>>>>>     
>>>>
>>>>   
>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> Terms of use : http://incubator.apache.org/harmony/mailing.html
>> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
>> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
>>
>>
>
>


---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Re: Classpath setting for Eclipse(was Re: [jira] Resolved: (HARMONY-349) The currency field of DecimalFormatSymbols is not deserialized properly)

Posted by Paulex Yang <pa...@gmail.com>.
Well, George, you caught me;)

I tried your solution on TEXT module at first, but for some unknown 
reasons, Eclipse refused to compile according to the modification and 
outputs:

"Cannot nest output folder 'text/bin/main' inside output folder 'text/bin' "

I have no idea what happened, so I took a shortcut to walk around.  My 
environment is Eclipse 3.2 M5 on WinXP

If this issue can be resolved, I'm fine to output them directly to 
existing bin/test directory.


George Harley wrote:
> Hi Paulex,
>
> Adding new Eclipse source folders to a module to cater for the 
> resources sounds good to me, but I don't understand the need to have 
> their output go to new sub-folders under bin. Why not just have test 
> resources go under the existing bin/test and main resources go under 
> bin/main like this ...
>
> <classpathentry output="bin/test" kind="src" path="src/test/resources"/>
> <classpathentry output="bin/main" kind="src" path="src/main/resources"/>
>
>
> Best regards,
> George
>
>
> Paulex Yang wrote:
>> Recently we have agreed to put the serialization data file to the 
>> <module>/test/resources/serialization directory, but which requires 
>> Eclipse user additional setting to run serialization tests. To handle 
>> this issue, I propose to add the following lines to .classpath file 
>> of each module as below, so that the files in resources directory can 
>> be built into default classpath. Comments?
>>
>>    <classpathentry output="bin/resources/test" kind="src" 
>> path="src/test/resources"/>
>>    <classpathentry output="bin/resources/main" kind="src" 
>> path="src/main/resources"/>
>>
>> George Harley (JIRA) wrote:
>>>      [ http://issues.apache.org/jira/browse/HARMONY-349?page=all ]
>>>      George Harley resolved HARMONY-349:
>>> -----------------------------------
>>>
>>>     Resolution: Fixed
>>>
>>> Hi Paulex,
>>> Changes committed in revision 395251. I made a couple of 
>>> modifications to the supplied test case to enable it to load the 
>>> .ser file from the system classloader. In addition I put the .ser 
>>> into the modules/text/src/test/resources/serialization/java/text 
>>> location and updated the build.xml with a new copy.test.resources 
>>> target so that this .ser file (and eventually others like it) make 
>>> it onto the runtime classpath.
>>> Please could you confirm if this version of your patch has been 
>>> applied to your satisfaction.
>>> Thanks for this enhancement, George
>>>
>>>  
>>>>  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
>>>>     
>>>
>>>   
>>
>>
>
>
> ---------------------------------------------------------------------
> Terms of use : http://incubator.apache.org/harmony/mailing.html
> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
>
>


-- 
Paulex Yang
China Software Development Lab
IBM



---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Re: Classpath setting for Eclipse(was Re: [jira] Resolved: (HARMONY-349) The currency field of DecimalFormatSymbols is not deserialized properly)

Posted by George Harley <ge...@googlemail.com>.
Hi Paulex,

Adding new Eclipse source folders to a module to cater for the resources 
sounds good to me, but I don't understand the need to have their output 
go to new sub-folders under bin. Why not just have test resources go 
under the existing bin/test and main resources go under bin/main like 
this ...

<classpathentry output="bin/test" kind="src" path="src/test/resources"/>
<classpathentry output="bin/main" kind="src" path="src/main/resources"/>


Best regards,
George


Paulex Yang wrote:
> Recently we have agreed to put the serialization data file to the 
> <module>/test/resources/serialization directory, but which requires 
> Eclipse user additional setting to run serialization tests. To handle 
> this issue, I propose to add the following lines to .classpath file of 
> each module as below, so that the files in resources directory can be 
> built into default classpath. Comments?
>
>    <classpathentry output="bin/resources/test" kind="src" 
> path="src/test/resources"/>
>    <classpathentry output="bin/resources/main" kind="src" 
> path="src/main/resources"/>
>
> George Harley (JIRA) wrote:
>>      [ http://issues.apache.org/jira/browse/HARMONY-349?page=all ]
>>      George Harley resolved HARMONY-349:
>> -----------------------------------
>>
>>     Resolution: Fixed
>>
>> Hi Paulex,
>> Changes committed in revision 395251. I made a couple of 
>> modifications to the supplied test case to enable it to load the .ser 
>> file from the system classloader. In addition I put the .ser into the 
>> modules/text/src/test/resources/serialization/java/text location and 
>> updated the build.xml with a new copy.test.resources target so that 
>> this .ser file (and eventually others like it) make it onto the 
>> runtime classpath.
>> Please could you confirm if this version of your patch has been 
>> applied to your satisfaction.
>> Thanks for this enhancement, George
>>
>>  
>>>  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
>>>     
>>
>>   
>
>


---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Classpath setting for Eclipse(was Re: [jira] Resolved: (HARMONY-349) The currency field of DecimalFormatSymbols is not deserialized properly)

Posted by Paulex Yang <pa...@gmail.com>.
Recently we have agreed to put the serialization data file to the 
<module>/test/resources/serialization directory, but which requires 
Eclipse user additional setting to run serialization tests. To handle 
this issue, I propose to add the following lines to .classpath file of 
each module as below, so that the files in resources directory can be 
built into default classpath. Comments?

    <classpathentry output="bin/resources/test" kind="src" 
path="src/test/resources"/>
    <classpathentry output="bin/resources/main" kind="src" 
path="src/main/resources"/>

George Harley (JIRA) wrote:
>      [ http://issues.apache.org/jira/browse/HARMONY-349?page=all ]
>      
> George Harley resolved HARMONY-349:
> -----------------------------------
>
>     Resolution: Fixed
>
> Hi Paulex, 
>
> Changes committed in revision 395251. I made a couple of modifications to the supplied test case to enable it to load the .ser file from the system classloader. In addition I put the .ser into the modules/text/src/test/resources/serialization/java/text location and updated the build.xml with a new copy.test.resources target so that this .ser file (and eventually others like it) make it onto the runtime classpath. 
>
> Please could you confirm if this version of your patch has been applied to your satisfaction. 
>
> Thanks for this enhancement, 
> George
>
>   
>>  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
>>     
>
>   


-- 
Paulex Yang
China Software Development Lab
IBM



---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


[jira] Resolved: (HARMONY-349) The currency field of DecimalFormatSymbols is not deserialized properly

Posted by "George Harley (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-349?page=all ]
     
George Harley resolved HARMONY-349:
-----------------------------------

    Resolution: Fixed

Hi Paulex, 

Changes committed in revision 395251. I made a couple of modifications to the supplied test case to enable it to load the .ser file from the system classloader. In addition I put the .ser into the modules/text/src/test/resources/serialization/java/text location and updated the build.xml with a new copy.test.resources target so that this .ser file (and eventually others like it) make it onto the runtime classpath. 

Please could you confirm if this version of your patch has been applied to your satisfaction. 

Thanks for this enhancement, 
George

>  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


[jira] Commented: (HARMONY-349) The currency field of DecimalFormatSymbols is not deserialized properly

Posted by "Paulex Yang (JIRA)" <ji...@apache.org>.
    [ 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


[jira] Updated: (HARMONY-349) The currency field of DecimalFormatSymbols is not deserialized properly

Posted by "Paulex Yang (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-349?page=all ]

Paulex Yang updated HARMONY-349:
--------------------------------

    Attachment: 02.JIRA349_text.zip

Pls. try this patch. thank you.

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


[jira] Assigned: (HARMONY-349) The currency field of DecimalFormatSymbols is not deserialized properly

Posted by "George Harley (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-349?page=all ]

George Harley reassigned HARMONY-349:
-------------------------------------

    Assign To: George Harley

>  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