code: public ResourceBundle getResourceBundle(String baseName, ClassLoader loader) {
          UResourceBundle urb = null;
          UResourceBundle candidate = null;
          String actualLocaleName = null;
          List<ULocale> fallbacks = getLocales();
          for (int i = 0; i < fallbacks.size(); i++) {
              String localeName = (fallbacks.get(i)).toString();
              if (actualLocaleName != null && localeName.equals(actualLocaleName)) {
                  // Actual locale name in the previous round may exactly matches
                  // with the next fallback locale
                  urb = candidate;
                  break;
              }
              try {
                  if (loader == null) {
                      candidate = UResourceBundle.getBundleInstance(baseName, localeName);
                  }
                  else {
                      candidate = UResourceBundle.getBundleInstance(baseName, localeName, loader);
                  }
                  if (candidate != null) {
                      actualLocaleName = candidate.getULocale().getName();
                      if (actualLocaleName.equals(localeName)) {
                          urb = candidate;
                          break;
                      }
                      if (urb == null) {
                          // Preserve the available bundle as the last resort
                          urb = candidate;
                      }
                  }
              } catch (MissingResourceException mre) {
                  actualLocaleName = null;
                  continue;
              }
          }
          if (urb == null) {
              throw new MissingResourceException("Can't find bundle for base name "
                      + baseName, baseName, "");
          }
          return urb;
      }
docs: Convenience function to get a ResourceBundle instance using
  the specified base name and class loader based on the language/locale
  priority list stored in this object.
  
  @param baseName the base name of the resource bundle, a fully qualified
  class name
  @param loader the class object from which to load the resource bundle
  @return a resource bundle for the given base name and locale based on the
  language/locale priority list stored in this object
  @hide draft / provisional / internal are hidden on Android