-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Android is upgrading from Java 8 to OpenSDK 17 #2365
Comments
Are there other changes that needs to be made to fix this issue other than the DateFormat changes? |
@mihirv0ra, I think the main open questions here are:
If have tested this in Android Studio with an emulator for a device running API level 33 (Android 13) and API level 34. It appears Regarding usages of So to me it appears there is no action needed for Gson for now. But please feel free to test this yourself (maybe also on a physical Android device) in case my test setup was incorrect. |
Could it be the impact of Gson is huge so is blocking the change from Android? |
Apparently yes... that is quite unfortunate 😒 In hindsight I assume no one is happy about Gson using a human readable and locale specific formatting of dates by default instead of a well defined format such as ISO-8601. Though I guess this cannot be solved now anymore without breaking backward compatibility. Edit: To clarify, the above is my personal opinion; I am not a direct member of this project and also was not involved in this project nor in any decisions when |
Could it be done by re-try? If the 1st parsing with newer patten failed, fallback to the original one? |
Maybe; though at least I am not very familiar with the date handling code of Gson. It appears I think the other main problem is that for serialization it uses |
Hmm, the idea in my previous comment to duplicate CLDR logic is probably neither very realistic nor worth the effort. Though @seventhmoon, I think you raised some interesting points here. I have created #2472 now to track the idea of switching to ISO 8601 format for |
Follow up on fix Java9 DateFormat changes
#1211
Android is moving to newer Java implementations
from https://developer.android.com/about/versions/13/features#core-libraries
And in Android 14, it will update more implementation following OpenJDK 17.
from https://android-developers.googleblog.com/2023/02/first-developer-preview-android14.html
That may cause issues related to DateFormat as the current implementation in Gson assume Android's implementation will not change.
The text was updated successfully, but these errors were encountered: