We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
There's a logic that checks whether the given currency is valid
private boolean isValid(final Currency currency) { return currency != null && currency.getSymbol() != null && currency.getName() != null && currency.getCode() != null; }
Yet, there are currencies which have no symbol defined, like Hong Kong Dollar
{ "country": "HK", "name": "Hong Kong dollar", "code": "HKD" }
This effectively excludes such currencies from being added to currencyMap field.
currencyMap
private void loadCurrencies(Context context) { final String currencyArray = AssetsReader.readFromAssets(context, R.raw.com_blongho_country_data_currencies); Gson gson = new Gson(); final Currency[] currencies = gson.fromJson(currencyArray, Currency[].class); for (final Currency currency : currencies) { if (isValid(currency)) { currencyMap.put(currency.getCountry().toLowerCase(), currency); } } }
Would it make sense to mark the symbol field as @Nullable and remove isValid() check?
symbol
@Nullable
isValid()
The text was updated successfully, but these errors were encountered:
Your first issue in worldCountryData. The team will take a look at it as soon as possible
Sorry, something went wrong.
Staled issue
Thanks for this eye-opener. This issue has been resolved
No branches or pull requests
There's a logic that checks whether the given currency is valid
Yet, there are currencies which have no symbol defined, like Hong Kong Dollar
This effectively excludes such currencies from being added to
currencyMap
field.Would it make sense to mark the
symbol
field as@Nullable
and removeisValid()
check?The text was updated successfully, but these errors were encountered: