-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Version 2.13.2 uses Method.getParameterCount()
which is not supported on Android before API 26
#3412
Comments
Oh crap. :-( This was not intentional -- but teaches me to not cherry pick changes into patch. PR #3293 should have gone in 2.14(.0). I wonder if it was worth reverting this for 2.13.3, keeping for 2.14? |
I'm not sure my point of view is relevant (I'm a bit biased as I mostly use Jackson on Android), but maintaining a 2.13.x branch (with security patches), that is compatible with older Android versions would be perfect for me. And if branch 2.14 breaks support for Android API <26, that's not a problem. We'll upgrade to this branch once we drop support for these Android versions in our app. |
Method.getParameterCount()
which is not supported on Android before API 26
@finiasz I made changes to revert #3293 from 2.13, so things should work in 2.13.3. I pushed |
Many thanks for your time @cowtowncoder, I'll check this tomorrow as it's getting late here in France :) |
Perfect, thank you @finiasz! |
I was able to run some tests today and did not run into any issue when using the code from the latest commit in branch 2.13. So my understanding is that you caught all the problematic calls to However, keep in mind that I only use a small portion of the features of jackson, with simple serialization and deserialization of POJOs, so my tests should not be considered as "exhaustive"! |
@finiasz Understood. Thank you for doing that level of verification; I did try to change relevant places outside of just one you reported. But it can definitely be the case that something else was still there... I hope others can help if and when they hit this issue. |
I came to report this same issue, we just bumped from 2.12.1 up to 2.13.2 and ran in to this issue on older Android APIs. Is there a release date for 2.13.3 ? |
No release date, the usual OSS style "when it's ready" means in Jackson's case that there should be enough fixes, or, sometimes, enough time has passed. Former can be seen on: https://github.com/FasterXML/jackson/wiki/Jackson-Release-2.13.3 and latter varies a bit; for first patch maybe 1 month since .0, later on from 2 to 4 months. At this point there are not many fixes so 2.13.3 would probably be released at earliest in May, maybe June. Having said that, I think this particular fix is actually contained in micro releases 2.13.2.1 and 2.13.2.2 which were released to address unrelated security issue (#2816). https://github.com/FasterXML/jackson/wiki/Jackson-Release-2.13 |
Thanks @cowtowncoder |
Thanks @cowtowncoder! Also came here to report and was so happy to see there's already a fix in the micro-releases. Will report back if it works. |
- Manually specify databind version to fix FasterXML/jackson-databind#3412, as the Kotlin module still depends on the unfixed version and hasn't had a new release yet
- Manually specify databind version to fix FasterXML/jackson-databind#3412, as the Kotlin module still depends on the unfixed version and hasn't had a new release yet
2.13.3 now released, upgrade recommended for Android users. |
Kotlin 1.6.21 -> 1.7.0 Kotlin Coroutines 1.6.1 -> 1.6.3 Koin 3.1.6 -> 3.2.0 Android Gradle Plugin 7.1.3 -> 7.2.1 Firebase Gradle Plugin 2.8.1 -> 2.9.1 AndroidX AppCompat 1.4.1 -> 1.4.2 AndroidX ConstraintLayout 2.1.3 -> 2.1.4 AndroidX Core 1.7.0 -> 1.8.0 Material Components 1.6.0-rc01 -> 1.6.1 Firebase BOM 29.3.1 -> 30.2.0 Play Services Ads 20.6.0 -> 21.0.0 Glide 4.13.1 -> 4.13.2 Jackson Kotlin Module 2.13.2 -> 2.13.3 (fixes crashes on API < 26: FasterXML/jackson-databind#3412) Also migrated from the monolithic Play Core library (1.10.3) to the Play In-App Updates library (2.0.0): https://developer.android.com/reference/com/google/android/play/core/release-notes#partitioned-apis. We weren't using any other Play Core feature. Note: Google Services Plugin was not updated from 4.3.10 -> 4.3.12 because of https://issuetracker.google.com/issues/237071883.
- Manually specify databind version to fix FasterXML/jackson-databind#3412, as the Kotlin module still depends on the unfixed version and hasn't had a new release yet
This is broken again in 2.14, or it was intended to drop Android <API26 support? |
@vitalyster Not fully intentional. I do wish that at least one Android developer had tested one of multiple release candidates so this was uncovered early enough to decide on which path to take. However, reading through notes I think the idea was to postpone the compatibility change. I'll add notes to the new issue (#3658) |
After updating from jackson 2.13.1 to jackson 2.13.2 I noticed my app no longer worked on Android API 21.
After digging into the code I found the issue at line 187 of
AnnotatedMethodCollector.java
:m.getParameterTypes().length
m.getParameterCount()
However, the getParameterCount() method requires API 26 on Android.
For now, I'm sticking to version 2.13.1 😄
EDIT: the fix included the official
2.13.3
releaseThe text was updated successfully, but these errors were encountered: