if (i != -1) {
String temp = localeName.substring(0, i);
b = (ICUResourceBundle)instantiateBundle(baseName, temp, root, disableFallback);
- if(b!=null && b.getULocale().equals(temp)){
+ if(b!=null && b.getULocale().getName().equals(temp)){
b.setLoadingStatus(ICUResourceBundle.FROM_FALLBACK);
}
}else{
/**
* Returns true if the other object is another ULocale with the
- * same full name, or is a String localeID that matches the full name.
+ * same full name.
* Note that since names are not canonicalized, two ULocales that
* function identically might not compare equal.
*
if (this == obj) {
return true;
}
- if (obj instanceof String) {
- return localeID.equals((String)obj);
- }
if (obj instanceof ULocale) {
return localeID.equals(((ULocale)obj).localeID);
}
try{
bundle = (ICUResourceBundle) UResourceBundle.getBundleInstance(ICUResourceBundle.ICU_COLLATION_BASE_NAME,ULocale.canonicalize("de__PHONEBOOK"));
- if(!bundle.getULocale().equals("de")){
+ if(!bundle.getULocale().getName().equals("de")){
errln("did not get the expected bundle");
}
key = bundle.getStringWithFallback("collations/collation/default");
}
bundle = UResourceBundle.getBundleInstance(ICUResourceBundle.ICU_BASE_NAME, "bogus");
- if(bundle instanceof UResourceBundle && bundle.getULocale().equals("en_US")){
+ if(bundle instanceof UResourceBundle && bundle.getULocale().getName().equals("en_US")){
logln("wrapper mechanism works for bogus locale");
}else{
errln("wrapper mechanism failed for bogus locale.");
if(locales.length<10){
errln("Did not get the correct result from getAvailableLocales");
}
- if(!locales[locales.length-1].equals("zu_ZA")){
+ if(!locales[locales.length-1].getName().equals("zu_ZA")){
errln("Did not get the expected result");
}
}