jdk/src/share/classes/java/util/Locale.java
changeset 7783 8eb31199b5ed
parent 7513 7091fccbc86d
child 8149 768769e3cddd
equal deleted inserted replaced
7782:edfd4b1cd078 7783:8eb31199b5ed
  1447      * @return A three-letter abbreviation of this locale's language.
  1447      * @return A three-letter abbreviation of this locale's language.
  1448      * @exception MissingResourceException Throws MissingResourceException if
  1448      * @exception MissingResourceException Throws MissingResourceException if
  1449      * three-letter language abbreviation is not available for this locale.
  1449      * three-letter language abbreviation is not available for this locale.
  1450      */
  1450      */
  1451     public String getISO3Language() throws MissingResourceException {
  1451     public String getISO3Language() throws MissingResourceException {
  1452         String language3 = getISO3Code(_baseLocale.getLanguage(), LocaleISOData.isoLanguageTable);
  1452         String lang = _baseLocale.getLanguage();
       
  1453         if (lang.length() == 3) {
       
  1454             return lang;
       
  1455         }
       
  1456 
       
  1457         String language3 = getISO3Code(lang, LocaleISOData.isoLanguageTable);
  1453         if (language3 == null) {
  1458         if (language3 == null) {
  1454             throw new MissingResourceException("Couldn't find 3-letter language code for "
  1459             throw new MissingResourceException("Couldn't find 3-letter language code for "
  1455                     + _baseLocale.getLanguage(), "FormatData_" + toString(), "ShortLanguage");
  1460                     + lang, "FormatData_" + toString(), "ShortLanguage");
  1456         }
  1461         }
  1457         return language3;
  1462         return language3;
  1458     }
  1463     }
  1459 
  1464 
  1460     /**
  1465     /**