private String getCurrencyName(CurrencyUnit currency) {
        Currency jdkCurrency = getCurrency(currency.getCurrencyCode());
        if (jdkCurrency!=null) {
            return jdkCurrency.getDisplayName(locale);
        }
        return currency.getCurrencyCode();
    }
private String getCurrencyName ( CurrencyUnit currency ) { Currency jdkCurrency = getCurrency ( currency . getCurrencyCode ( ) ) ; if ( jdkCurrency != null ) { return jdkCurrency . getDisplayName ( locale ) ; } return currency . getCurrencyCode ( ) ; }
This method tries to evaluate the localized display name for a
{@link CurrencyUnit}. It uses {@link Currency#getDisplayName(Locale)} if
the given currency code maps to a JDK {@link Currency} instance.

If not found {@code currency.getCurrencyCode()} is returned.

@param currency The currency, not {@code null}
@return the formatted currency name.