Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-3320

Database creation and boot should fail if collation=TERRITORY_BASED and the selected locale is not supported

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 10.4.1.3
    • Fix Version/s: 10.3.3.0, 10.4.1.3, 10.5.1.1
    • Component/s: Services
    • Labels:
      None
    • Environment:
      Java ME:
      Product: phoneME Advanced (phoneme_advanced_mr2-b34)
      Profile: Foundation Profile Specification 1.1

      Linux 2.4.21-40.ELsmp #1 SMP Thu Feb 2 22:14:12 EST 2006 i686 athlon i386 GNU/Linux

      Description

      A problem I've discovered when testing with the phoneME advanced platform is that the collationtests expect other locales than Locale.US to be available on the platform that is used for the test, and for phoneME advanced (when compiled as foundation profile) only Locale.US is available. From the jdk1.6 javadoc of Collator.getAvailableLocales() I see that only Locale.US is strictly required:

      public static Locale[] getAvailableLocales()

      Returns an array of all locales for which the getInstance methods of this class can return localized instances. The returned array represents the union of locales supported by the Java runtime and by installed CollatorProvider implementations. It must contain at least a Locale instance equal to Locale.US.

      Returns:
      An array of locales for which localized Collator instances are available.

      This led me to thinking about how Derby should behave if created/booted with collation=TERRITORY_BASED and territory=<some unsupported locale>. I'm not sure what the consequences could be if the database is first created on a platform that supports whatever locale is set and later booted with one that doesn't, or created on a platform missing support and later booted with one that has. In any case I think it may confuse a user needlessly to see the database boot successfully with his collation setting and later behave in a way he does not expect.

      Opinions voiced on the derby-dev list are that both database creation and boot should fail if collation=TERRITORY_BASED and the selected locale is not supported.

      If a change like this is implemented, the collationtests should be changed to verify correct behavior also if they are executed in an environment were some of the tested locales are not supported.

        Attachments

        1. DERBY_3320_Repro.java
          2 kB
          Mamta A. Satoor
        2. DERBY_3320_not_ready_for_commit_diff_v1.txt
          10 kB
          Mamta A. Satoor
        3. DERBY_3320_not_ready_for_commit_stat_v1.txt
          0.5 kB
          Mamta A. Satoor
        4. DERBY_3320_Collator_Support_Check_diff_v2.txt
          17 kB
          Mamta A. Satoor
        5. DERBY_3320_Collator_Support_Check_stat_v2.txt
          0.5 kB
          Mamta A. Satoor

          Issue Links

            Activity

              People

              • Assignee:
                mamtas Mamta A. Satoor
                Reporter:
                vemund Vemund Østgaard
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: