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