JDK-4149890 : RFE: Provide for Thai and other locales that need different subclasses
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.util:i18n
  • Affected Version: 1.2.0
  • Priority: P5
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 1998-06-17
  • Updated: 2001-11-13
  • Resolved: 2001-11-13
Related Reports
Duplicate :  
Description

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

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

Comments
EVALUATION Thai locale support is planned for Merlin. Stuart Gill is leading the effort. brian.beck@Eng 2000-01-26 Thai collation was added without the need to modify the Collator or other factory methods in the internationalization packages. However, this RFE is in general a good thing (TM). It should be looked into in the future for the pluggable locale work. stuart.gill@eng 2000-12-15 Pluggable locale support is tracked under RFE 4052440. ###@###.### 2001-11-13
15-12-2000