Loading... (original) (raw)

ADDITIONAL SYSTEM INFORMATION :
Mac OSX 10.13.6
Output of java -version:

openjdk version "11-ea" 2018-09-25
OpenJDK Runtime Environment 18.9 (build 11-ea+25)
OpenJDK 64-Bit Server VM 18.9 (build 11-ea+25, mixed mode)

A DESCRIPTION OF THE PROBLEM :
When invoking DateFormat.getTimeInstance(DateFormat.SHORT, locale) when locale is either "Burmese" or "Burmese (Myanmar (Burma))", an IllegalArgumentException is thrown with the message: "Illegal pattern character 'B'".

The exception does not occur in production versions of Java (neither Java 1.8.0_181 nor 10.0.2 encounter this problem).

REGRESSION : Last worked in version 10.0.2

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Compile the test case source code.
2. Run the class using Java 10.0.2, piping through grep for 'FAIL'. e.g.:
java LocaleTest |grep 'FAIL'

You should get no output.

3. Repeat step 2, except use Java 11-ea build 11-ea+25

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
There should also be no output.
ACTUAL -
Burmese: FAIL
Burmese (Myanmar (Burma)): FAIL

---------- BEGIN SOURCE ----------
import java.text.DateFormat;
import java.util.Arrays;
import java.util.Locale;

public class LocaleTest {
public static void main(String[] args) {
Arrays.asList(Locale.getAvailableLocales()).forEach(locale -> {
System.out.print(locale.getDisplayName()+": ");
try {
DateFormat.getTimeInstance(DateFormat.SHORT, locale);
System.out.println("PASS");
} catch(IllegalArgumentException ex) {
System.out.println("FAIL");
}
});
}
}
---------- END SOURCE ----------

CUSTOMER SUBMITTED WORKAROUND :
Not investigated

FREQUENCY : always