FULL PRODUCT VERSION :
openjdk version "1.8.0_40-internal"
OpenJDK Runtime Environment (build 1.8.0_40-internal-b09)
OpenJDK 64-Bit Server VM (build 25.40-b13, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Linux laptop 3.16.0-29-generic #39-Ubuntu SMP Mon Dec 15 22:27:29 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
A DESCRIPTION OF THE PROBLEM :
In Java 7 and earlier, DateFormatSymbols.getMonths() used to return month names in their nominative case. For Czech, results were "leden", "unor", ... - months were in their standalone form.
Applications use this function just to get month names.
However, fixing bug JDK-7079560 changed this and months are returned in genitive case like "ledna", "unora".
In Czech, this is used when writing full date (1. ledna 2015) and is never used in standalone format.
Applications written for Java 7 and older expect standalone form and use it incorrectly, when choosing month and when they are just mentioning it. User therefore selects from "ledna", "unora" instead of correct "leden", "unor".
REGRESSION. Last worked in version 7u76
ADDITIONAL REGRESSION INFORMATION:
It works in any Java 7 or older.
java version "1.7.0_65"
OpenJDK Runtime Environment (IcedTea 2.5.3) (7u71-2.5.3-0ubuntu1)
OpenJDK 64-Bit Server VM (build 24.65-b04, mixed mode)
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Run application, that uses DateFormatSymbols.getMonths() to get month names.
Application displays months in their nominative form in Java < 7 and in their genitive form in Java 8.
Older application, that rely on nominative form will use the month names incorrectly.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Application should get same form no matter which version is used.
ACTUAL -
Application gets months in their nominative form in Java < 7 and in their genitive form in Java 8.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
class Test {
public static void main(String[] s) {
DateFormatSymbols dateFormatSymbols = new DateFormatSymbols();
String[] monthNames = dateFormatSymbols.getMonths();
System.out.println(monthNames[0]); //returns "leden" on JDK7 (and older); returns "ledna" on JDK8
}
}
---------- END SOURCE ----------