You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The default formats used in DateFormat has changes in Java 9. For example:
Java8 (and below): "Jan 1, 1970 12:00:00 AM"
Java9: "Jan 1, 1970, 12:00:00 AM"
Java8 (and below): "Thursday, January 1, 1970 12:00:00 AM UTC"
Java9: "Thursday, January 1, 1970 at 12:00:00 AM Coordinated Universal Time"
As a result, a number of Gson unit tests currently fail when run on Java 9. Additionally, this causes some sort of a backward incompatibility: a date written by Gson in Java 8 cannot be parsed back in Java 9.
In order to fix it, I suggest the following changes:
provide a way for Gson to read default "old" formats. As Gson by default uses only US date formats, it is possible;
change "write" unit tests so that they check the results depending on the current Java version. If run on Java 9 or later, expect the new formats to be used; otherwise, expect the "old" results
The text was updated successfully, but these errors were encountered:
The default formats used in DateFormat has changes in Java 9. For example:
As a result, a number of Gson unit tests currently fail when run on Java 9. Additionally, this causes some sort of a backward incompatibility: a date written by Gson in Java 8 cannot be parsed back in Java 9.
In order to fix it, I suggest the following changes:
The text was updated successfully, but these errors were encountered: