title: Locale.getDefault() returns unsuported / invalid Locale for Currency.getInstance
body: <p>my app uses the following code to get the local currency:</p>
  
  <pre><code>Locale locale = Locale.getDefault()
  java.util.Currency localCurrency = java.util.Currency.getInstance(locale);
  </code></pre>
  
  <p>This workes fine in all my tests and was never a problem before. Today I saw a CrashLog in the Google Play Developer Console: The app crashes with:</p>
  
  <pre><code>java.lang.IllegalArgumentException: Unsupported ISO 3166 country: es
  </code></pre>
  
  <p>I can easy reproduce this error when using <code>new Locale("es")</code> instead of <code>Locale.getDefault()</code>:</p>
  
  <pre><code>Locale locale = new Locale("es");
  java.util.Currency localCurrency = java.util.Currency.getInstance(locale);
  </code></pre>
  
  <p>Actually the same exception is thrown no matter was language code I use, e.g. "en", "de", "fr", etc. Only when also the country code is specified everthing workes fine, e.g. <code>new Locale("es", "ES")</code></p>
  
  <p>I have two problems with Exception:</p>
  
  <p><strong>1. Why is "es" not a valid locale?</strong> As fas as I understand Locale names are formed by a language code (lowercase), and an <strong>optional</strong> country code. Thus <code>es-ES</code>would be a valid locale but "es" should be as well, shouldn't it?</p>
  
  <p><strong>2. What can I do to avoid this problem?</strong> I use <code>Locale.getDefault()</code> all over the app to give the user locale currency, locale numberformat, etc. I would assume that the system always returns a valid Locale but this is obviously not the case. How can I make sure, that a valid locale is used?</p>