code: public static Currency getInstance(Locale locale) {
          synchronized (localesToCurrencies) {
              if (locale == null) {
                  throw new NullPointerException("locale == null");
              }
              Currency currency = localesToCurrencies.get(locale);
              if (currency != null) {
                  return currency;
              }
  
              String currencyCode = ICU.getCurrencyCode(locale);
              if (currencyCode == null) {
                  throw new IllegalArgumentException("Unsupported ISO 3166 country: " + locale);
              } else if (currencyCode.equals("XXX")) {
                  return null;
              }
              Currency result = getInstance(currencyCode);
              localesToCurrencies.put(locale, result);
              return result;
          }
      }
docs: Returns the {@code Currency} instance for this {@code Locale}'s country.
  @throws IllegalArgumentException
  if the locale's country is not a supported ISO 3166 country.