Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8294227

HotSpot (JDK8) fails to output the correct data when calling the function Locale

    XMLWordPrintable

Details

    Description

      ADDITIONAL SYSTEM INFORMATION :
      Ubuntu 18.04 x86_64

      A DESCRIPTION OF THE PROBLEM :
      When calling the function `Locale getDisplayCountry(Locale inLoc)`, HotSpot (JDK8) cannot output correct data according to the argument `inLoc`.

      In the following test case, the language environment is `Finnish`, but HotSpot (on JDK8) incorrectly outputs `Finland` in `English` environment. The expected result should be `Suomi`, as shown in HotSpot (on JDK11).

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Suomi
      ACTUAL -
      Finland

      ---------- BEGIN SOURCE ----------
      public class Test {
          public static void main(String[] args) throws Exception {
              Locale fiLocale1 = new Locale("fi", "FI");
              System.out.println(fiLocale1.getDisplayCountry(fiLocale1));
          }
      }
      ---------- END SOURCE ----------

      FREQUENCY : always


      Attachments

        Activity

          People

            sswsharm swati sharma (Inactive)
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: