-
Bug
-
Resolution: Fixed
-
P4
-
8
-
Any platform that supports Java.
JDK8 b61
-
b61
-
b65
-
generic
-
generic
-
Verified
Run the attached test program, with -Djava.locale.providers=SPI, but no implementation of CalendarDataProvider is in the java extension directory. In this case, the value got from JRE adapter should be returned, but the returned value is null.
This only happens when type is STANDALONE. For example, String sunday = cal.getDisplayName(Calendar.DAY_OF_WEEK, Calendar.SHORT_STANDALONE, new Locale(args[0], args[1]));
If the type is not STANDALONE, for example, String sunday = cal.getDisplayName(Calendar.DAY_OF_WEEK, Calendar.SHORT_FORMAT, new Locale(args[0], args[1])), the return value will be from JRE, not null.
For other methods like getFirstDayOfWeek(), program still returns the value from JRE adapter, when there is no SPI implementation.
Attached is the screen shot of program output.
This only happens when type is STANDALONE. For example, String sunday = cal.getDisplayName(Calendar.DAY_OF_WEEK, Calendar.SHORT_STANDALONE, new Locale(args[0], args[1]));
If the type is not STANDALONE, for example, String sunday = cal.getDisplayName(Calendar.DAY_OF_WEEK, Calendar.SHORT_FORMAT, new Locale(args[0], args[1])), the return value will be from JRE, not null.
For other methods like getFirstDayOfWeek(), program still returns the value from JRE adapter, when there is no SPI implementation.
Attached is the screen shot of program output.