LocaleEnhanceTest has incorrectly passing test case

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • 26
    • Affects Version/s: 26
    • Component/s: core-libs
    • b21
    • generic
    • generic

      While working on JDK-8369452, I noticed that LocaleEnhanceTest has a test case that checks if Locale.Builder.setLanguageTag(String) throws IllFormedException when passed a tag with multiple extensions or when passed a tag with duplicate keys for the unicode locale extension. Specifically,

      `new BuilderILE() { public void call() { b.setLanguageTag("und-a-xx-yy-b-ww-A-00-11-c-vv"); }};`

      and

      `new Builder().setLanguageTag("und-u-nu-thai-NU-chinese-xx-1234")`

      In actuality, no test is run because the original code did not pass any arguments to the BuilderILE ctor (which is the test's helper class). When run() is called, no args are available, and run is executed 0 times.

      While fixing this, we can also get rid of the in-house test framework classes in favor of JUnit utilities.

            Assignee:
            Justin Lu
            Reporter:
            Justin Lu
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: