-
Bug
-
Resolution: Fixed
-
P3
-
11, 15
-
b23
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8320411 | 11.0.22 | Christoph Langer | P3 | Resolved | Fixed | b04 |
"Consider following class:
import java.text.DateFormat;
import java.util.Calendar;
import java.util.GregorianCalendar;
public class Main
{
public static void main( String[] args )
{
GregorianCalendar date = new GregorianCalendar( 2020, Calendar.JANUARY,1 );
DateFormat formatter = DateFormat.getDateTimeInstance();
String expected = "01.01.2020, 00:00:00";
String formatted = formatter.format( date.getTime() );
System.out.println(String.format( "expected: %s%nactual: %s", expected, formatted ) );
}
}
When running this class java 14 and with VM arguments `-
Duser.country=DE -Duser.language=de -XX:StartFlightRecording`, `date`
will be formatted to `01.01.2020, 00:00:00`.
When running this class with java 14 and VM arguments `-
Duser.country=DE -Duser.language=de -XX:StartFlightRecording
-XX:FlightRecorderOptions=stackdepth=128`, `date` will be formatted to
`2020 Jan 1 00:00:00`.
I'd expect that in both cases, the formatted date is identical.
This scenario works as expected with latest java 11."
https://mail.openjdk.java.net/pipermail/hotspot-jfr-dev/2020-March/001313.html
import java.text.DateFormat;
import java.util.Calendar;
import java.util.GregorianCalendar;
public class Main
{
public static void main( String[] args )
{
GregorianCalendar date = new GregorianCalendar( 2020, Calendar.JANUARY,1 );
DateFormat formatter = DateFormat.getDateTimeInstance();
String expected = "01.01.2020, 00:00:00";
String formatted = formatter.format( date.getTime() );
System.out.println(String.format( "expected: %s%nactual: %s", expected, formatted ) );
}
}
When running this class java 14 and with VM arguments `-
Duser.country=DE -Duser.language=de -XX:StartFlightRecording`, `date`
will be formatted to `01.01.2020, 00:00:00`.
When running this class with java 14 and VM arguments `-
Duser.country=DE -Duser.language=de -XX:StartFlightRecording
-XX:FlightRecorderOptions=stackdepth=128`, `date` will be formatted to
`2020 Jan 1 00:00:00`.
I'd expect that in both cases, the formatted date is identical.
This scenario works as expected with latest java 11."
https://mail.openjdk.java.net/pipermail/hotspot-jfr-dev/2020-March/001313.html
- backported by
-
JDK-8320411 JFR: FlightRecorderOptions reset date format
- Resolved
- duplicates
-
JDK-8261913 Flight Recorder VM Option causes wrong initialization of Locale Providers
- New