ICU-2678 revert some changes, to make the behaviour analogous to ICU4C

X-SVN-Rev: 12279
This commit is contained in:
Ram Viswanadha 2003-06-04 18:31:15 +00:00
parent 18ca69ab9a
commit a80c79d030

View file

@ -334,11 +334,9 @@ public final class UScript {
*/
private static int[] findCodeFromLocale(Locale locale) {
ResourceBundle rb = ICULocaleData.getLocaleElements(locale);
if (rb==null) {
throw new MissingResourceException("Could not find data for {0} {1}", "com.ibm.icu.impl.dataLocaleElements", locale.toString());
}
// if rb is not a strict fallback of the requested locale, return null
if(!LocaleUtility.isFallbackOf(rb.getLocale(), locale)){
if(rb==null || !LocaleUtility.isFallbackOf(rb.getLocale(), locale)){
return null;
}
String[] scripts = rb.getStringArray("LocaleScript");