JDK-8150813 : Cannot get correct localized standalone month display name (java.time).
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.time
  • Affected Version: 8u73
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 2016-02-27
  • Updated: 2016-04-27
  • Resolved: 2016-03-03
Related Reports
Duplicate :  
Description
FULL PRODUCT VERSION :
Java 8

ADDITIONAL OS VERSION INFORMATION :
Windows 8

A DESCRIPTION OF THE PROBLEM :
The following code does not return the expected localized full month display name.

String fullMonthName = Month.JANUARY.getDisplayName(TextStyle.FULL_STANDALONE, Locale.US);

(This returns a string "1" instead of the expected string "January". All the other month constants currently perform similarly.)

I realize that the English language does not have separate strings for standalone or date-integrated month names, but for all similar languages with no difference, I believe the expected behavior of this function would be to return the same month string for TextStyle.FULL_STANDALONE or TextStyle.FULL, and certainly not to return the month number as a string.





REPRODUCIBILITY :
This bug can be reproduced always.


Comments
This is a duplicate of JDK-8146356. Closing this one, as the issue can be tracked with JDK-8146356.
03-03-2016