Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4149890

RFE: Provide for Thai and other locales that need different subclasses

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Duplicate
    • Icon: P5 P5
    • None
    • 1.2.0
    • core-libs



      Name: bb33257 Date: 06/17/98


      The getInstance methods in the international classes are
      currently hard-coded to use specific classes. That will not work
      when adding locales such as Thai, that requires different
      subclasses to function. The code in each getInstance method
      should be generalized slightly to allow this.
      Example:
      (The following sample has been simplified for brevity by
      removing the try/catch blocks.)
      The lines to be added are marked with //***

          ResourceBundle resource = ResourceBundle.getBundle
                                    ("java.text.resources.LocaleElements",
                                     desiredLocale);
          Object fullClass = resource.getObject("Collator"); // ***
          if (fullClass != null) return (Collator)fullClass; // ***
          colString = resource.getString("CollationElements");
          decomp = ((Integer)resource.getObject("CollationDecomp")).intValue();
          result = new RuleBasedCollator( CollationRules.DEFAULTRULES +
                                          colString,
                                          decomp );

      ======================================================================

            nlindenbsunw Norbert Lindenberg (Inactive)
            bcbeck Brian Beck (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: