r/mAndroidDev • MINSDK28 • Feb 14 '26

@Deprecated Android 17 deprecated static final fields not being final

Post image
98 Upvotes

12 comments sorted by

View all comments

Show parent comment

8

u/yatsokostya Feb 14 '26 edited Feb 14 '26

If the field wasn't inlined.I doubt that Strings are inlined. However, this is likely android runtime following some changes in JVM. It's actually a pain in the ass for runtime optimization that final fields are not really final, so inside JVM there were annotations like "TrueFinalNoCap"

https://openjdk.org/jeps/500