-
Bug
-
Resolution: Fixed
-
P4
-
26
-
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.
`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.
- relates to
-
JDK-8369739 Locale.Builder should fail on duplicate extensions and U-extension keywords/attributes
-
- Closed
-
- links to
-
Commit(master)
openjdk/jdk/1e5e17a1
-
Review(master)
openjdk/jdk/27775