google / google/gson

Android is upgrading from Java 8 to OpenSDK 17

Open
#2,365 7 comments 0 reactions 0 assignees View on GitHub
android bug
Dominant language
Java
Stars
24.2k
Forks
4.5k
Avg merge
6d 4h
Merged PRs (30d)
12

Description

Follow up on [fix Java9 DateFormat changes](https://github.com/google/gson/pull/1211#top)
#1211

Android is moving to newer Java implementations

from https://developer.android.com/about/versions/13/features#core-libraries
> Android 13 starts the work of refreshing Android's core libraries to align with the OpenJDK 11 LTS release with both library updates and Java 11 language support for application and platform developers. The core library changes introduced in Android 13 will also be available to Android 12 devices through a Google Play system update to the ART Mainline Module.

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
> OpenJDK 17 Support - This preview includes access to 300 OpenJDK 17 classes. We are working hard to fully enable Java 17 language features in upcoming developer previews. These include record classes, multi-line strings and pattern matching instanceof. Thanks to [Google Play system updates](https://android-developers.googleblog.com/2019/05/fresher-os-with-projects-treble-and-mainline.html) (Project Mainline), over 600M devices are enabled to receive the latest Android Runtime (ART) updates that include these changes. This is part of our commitment to give apps a more consistent, secure environment across devices, and to deliver new features and capabilities to users independent of platform releases.

That may cause issues related to DateFormat as the current implementation in Gson assume Android's implementation will not change.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.