Apache JDO Project - [jira] Updated: (JDO-397) Locale instances are shared by different

This is Interesting: Free IT Magazines  
Home > Archive > Apache JDO Project > December 2006 > [jira] Updated: (JDO-397) Locale instances are shared by different





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author [jira] Updated: (JDO-397) Locale instances are shared by different
Craig Russell (JIRA)

2006-12-11, 1:11 am

[ http://issues.apache.org/jira/browse/JDO-397?page=all ]

Craig Russell updated JDO-397:
------------------------------

Component/s: specification

The specification needs to be updated to resolve this issue.

> Locale instances are shared by different PMs (when in use as FCO)
> -----------------------------------------------------------------
>
> Key: JDO-397
> URL: http://issues.apache.org/jira/browse/JDO-397
> Project: JDO
> Issue Type: Bug
> Components: tck2, specification
> Affects Versions: JDO 2 final
> Reporter: Ilan Kirsh
> Fix For: JDO 2 maintenance release 1
>
>
> Tests in org.apache.jdo.tck.models.fieldtypes are using fields of Locale that are defined as FCO. The definition is only a hint to the implementation but when a FCO is actually used, the same JVM static Locale instances are persisted using different Per

sistenceManagers and tests fail.
> The solution:
> In org.apache.jdo.tck.models.fieldtypes.TestUtil lines 142-148:
> case(5):
> vec.add(0, Locale.CHINA.clone());
> vec.add(1, Locale.FRANCE.clone());
> vec.add(2, Locale.GERMANY.clone());
> vec.add(3, Locale.JAPAN.clone());
> vec.add(4, Locale.ITALY.clone());
> break;
> similar to cloning strings few lines above:
> case(3):
> vec.add(0, new String("Hello"));
> vec.add(1, new String("Welcome"));
> vec.add(2, new String("To The"));
> vec.add(3, new String("Beautiful"));
> vec.add(4, new String("World"));
> break;
> And also in org.apache.jdo.tck.pc.fieldtypes.AllTypes:
> public static final Locale[] Locale_values = {
> (Locale)Locale.US.clone(),
> (Locale)Locale.UK.clone(),
> (Locale)Locale.FRANCE.clone(),
> (Locale)Locale.GERMANY.clone(),
> (Locale)Locale.CANADA.clone(),
> (Locale)Locale.JAPAN.clone(),
> (Locale)Locale.ITALY.clone(),
> (Locale)Locale.CHINA.clone(),
> (Locale)Locale.KOREA.clone(),
> (Locale)Locale.TAIWAN.clone()
> };
> similar to cloning strings few lines above:
> public static final String[] String_values = {
> new String(""), new String("hello world"),
> new String("JDO has a very nice persistence API"), new String("JDO"),
> new String("Java"), new String("abcde"),
> new String("abcdef"), new String("JDO is a breeze to use"),
> new String("Java"), new String("Long-live JDO")
> };


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



Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com