Uploaded image for project: 'Harmony'
  1. Harmony
  2. HARMONY-5466

[classlib][util] display language is reset to the value of constructor after Locale is set as default.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • None
    • 5.0M5
    • None
    • All

    Description

      The following test succeeds on RI but fails on Harmony.
      ----------------------------
      import java.util.Locale;

      class LocaleDisplayLang {
      public static void main(String[] args) {
      Locale p = new Locale("la", "NZ");
      if(p.getDisplayLanguage().equals("Latin"))

      { System.out.println("PASSED"); } else { System.out.println("FAILED: Latin != " + p.getDisplayLanguage()); }
      Locale.setDefault(p);
      if(p.getDisplayLanguage().equals("Latin")) { System.out.println("PASSED"); }

      else

      { System.out.println("FAILED: Latin != " + p.getDisplayLanguage()); }

      }
      }
      ----------------------------
      RI prints
      PASSED
      PASSED
      but Harmony prints
      PASSED
      FAILED

      Attachments

        Issue Links

          Activity

            People

              tony.wu Tony Wu
              mcfirst Pavel Pervov
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: