mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-13 08:53:20 +00:00
ICU-3879 fix root lookup bug
X-SVN-Rev: 15971
This commit is contained in:
parent
0be855c64c
commit
d0e738fa88
2 changed files with 10 additions and 0 deletions
|
@ -52,6 +52,14 @@ public final class ICUResourceBundleTest extends TestFmwk {
|
|||
}
|
||||
|
||||
|
||||
}
|
||||
public void TestJB3879(){
|
||||
// this tests tests loading of root bundle when a resource bundle
|
||||
// for the default locale is requested
|
||||
ICUResourceBundle bundle = (ICUResourceBundle) UResourceBundle.getBundleInstance("com/ibm/icu/dev/data/testdata", ULocale.getDefault());
|
||||
if(bundle==null){
|
||||
errln("could not create the resource bundle");
|
||||
}
|
||||
}
|
||||
public void TestOpen(){
|
||||
ICUResourceBundle bundle = (ICUResourceBundle) UResourceBundle.getBundleInstance(ICUResourceBundle.ICU_BASE_NAME, "en_US_POSIX", ICUData.class.getClassLoader());
|
||||
|
|
|
@ -415,6 +415,8 @@ public abstract class UResourceBundle extends ResourceBundle{
|
|||
}else{
|
||||
if(defaultID.indexOf(localeName)==-1){
|
||||
b = instantiateICUResource(baseName, defaultID, root);
|
||||
}else if(rootLocale.length()!=0){
|
||||
b = ICUResourceBundle.createBundle(baseName, rootLocale, root);
|
||||
}
|
||||
}
|
||||
}else{
|
||||
|
|
Loading…
Add table
Reference in a new issue