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

Locale.toLanguageTag() uses "und" as lang subtag for private use only Locale

XMLWordPrintable

    • b130
    • x86
    • linux_ubuntu
    • Verified

      FULL PRODUCT VERSION :


      A DESCRIPTION OF THE PROBLEM :
      When an instance of Locale has empty language, toLanguageTag() needs to add "und", but except when private use field is available.

      For example -

          String tag = Locale.forLanguageTag("x-elmer").toLanguageTag();

      The code above should return "x-elmer", but it actually returns "und-x-elmer".


      REPRODUCIBILITY :
      This bug can be reproduced always.

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: