-
-
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.14.0 uses Method.getParameterCount() which is not supported on Android before API 26 #3658
Comments
I wish we had CI tests for Android compatibility testing. Also wish I had remembered that this had already been an issue quite recently (see #3412). But at this point I am tempted to say that the baseline Android SDK Jackson works with is 26; and for earlier SDKs one needs to use 2.13 or earlier. |
Method.getParameterCount()
which is not supported on Android before API 26
#3412
I am now adding Android SDK compatibility verification (via #3659) and it looks like 2.13 is compatible with Android SDK 24, except for use of Beyond that I think that verified minimum working baseline will be such that:
|
Will mark this as closed given that it is basically "works as planned" in that the idea was (but that I had forgotten) to start using specific method in 2.14. We now finally have actual checking for Android SDK compatibility for databind so that we shouldn't accidentally break compatibility going forward. But we also need to add notes on what the actual compatibility is, on README -- I will file another issue. Similarly for |
Thanks for the updates 🚀 |
You are welcome @jonnycaley ! |
Would it be possible to add some kind of a build-time warning/error? Normally one doesn't expect a minor release to intentionally (also permanently it seems: #3702 (comment)) break backwards compatibility, if you're going by semver:
Sometimes devs are lazy and don't boot up an old device to check if things still work after a minor dep update, so seeing a message at build-time would be preferable to finding out after releasing to prod. |
Koin 3.3.1 -> 3.3.2 Downgraded Jackson Kotlin Module from 2.14.1 -> 2.13.4 because of FasterXML/jackson-databind#3658
I don't think it's possible |
Wrt SemVer: although in perfect world major versions would be used to indicate compatibility changes, in practice this is not a workable for Jackson, given that a new major version behaves more like a fork (new package names, new Maven coordinates). So incremental changes to baseline requirements (minimum JDK has changes from Java 6 to Java 8 during Jackson 2.x, as another example) need to be made in minor versions. I am not sure how build time warning could work; especially since it specifically affects a subset of developers (Android devleopers). |
Describe the bug
This previous issue was re-introduced with the usage of
getParameterCount
insrc/main/java/com/fasterxml/jackson/databind/deser/BeanDeserializerBase.java
as seen in the release changes.Version information
Which Jackson version(s) was this for?
2.14.0
To Reproduce
Run the following code on a device running Android 24:
Expected behavior
Exception
java.lang.NoSuchMethodError: No virtual method getParameterCount()I in class Ljava/lang/reflect/Method; or its super classes (declaration of 'java.lang.reflect.Method' appears in /system/framework/core-oj.jar)
is not thrownAdditional context
Add any other context about the problem here.
Crashes on Android device running API 24
The text was updated successfully, but these errors were encountered: