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

Locale information for nb is not working properly

    XMLWordPrintable

Details

    • b19
    • 17
    • b21
    • generic
    • generic
    • Verified

    Backports

      Description

        A DESCRIPTION OF THE PROBLEM :
        When using the locale 'nb', information like weekdays, monthname etc. is not correct when a locale of 'nn' also has been used first. By not correct I mean they are expressed as some default language eg. english.

        I believe that the reason for this bug is a regression for commit https://github.com/openjdk/jdk/commit/f6e54f2f9a27d08b8789244d86354167f1478bb5
        Here nb.xml and other files have lost a lot of information. It was deleted in above state commit. Somehow in the language bundle selection there is code that tries to get the correct bundle for a given locale. This ends up in a bad state and english locale data is the result. I believe that the nb.xml should get the data back.


        REGRESSION : Last worked in version 14

        STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
        You just need to run some code to reproduce this.

        EXPECTED VERSUS ACTUAL BEHAVIOR :
        EXPECTED -
        nn: [, sø., må., ty., on., to., fr., la.]
        nb: [, søn., man., tir., ons., tor., fre., lør.]

        ACTUAL -
        nn: [, sø., må., ty., on., to., fr., la.]
        nb: [, Sun, Mon, Tue, Wed, Thu, Fri, Sat]

        ---------- BEGIN SOURCE ----------
        System.out.println("nn: " + Arrays.deepToString(DateFormatSymbols.getInstance(Locale.forLanguageTag("nn")).getShortWeekdays()));
        System.out.println("nb: " + Arrays.deepToString(DateFormatSymbols.getInstance(Locale.forLanguageTag("nb")).getShortWeekdays()));
        ---------- END SOURCE ----------

        CUSTOMER SUBMITTED WORKAROUND :
        No known workaround.

        FREQUENCY : always


        Attachments

          Issue Links

            Activity

              People

                naoto Naoto Sato
                webbuggrp Webbug Group
                Votes:
                0 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: