Skip to content
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

Change jackson-databind to only require Android SDK 23 #4236

Closed
shanjunmei opened this issue Nov 30, 2023 · 10 comments
Closed

Change jackson-databind to only require Android SDK 23 #4236

shanjunmei opened this issue Nov 30, 2023 · 10 comments

Comments

@shanjunmei
Copy link

public int getParamCount() {
        int c = this._paramCount;
        if (c < 0) {
            try{
                c = this._ctor.getParameterCount();
            }catch (NoSuchMethodError e){
                c=this._ctor.getParameterTypes().length;
            }

            this._paramCount = c;
        }

        return c;
    }
@yawkat
Copy link
Member

yawkat commented Nov 30, 2023 via email

@shanjunmei
Copy link
Author

This has already been discussed in #3702.

On Thu, Nov 30, 2023, 06:12 shanjunmei @.> wrote:

public int getParamCount() { int c = this._paramCount; if (c < 0) { try{ c = this._ctor.getParameterCount(); }catch (NoSuchMethodError e){ c=this._ctor.getParameterTypes().length; } this._paramCount = c; } return c; } — Reply to this email directly, view it on GitHub <#4236>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AASIZIIJXHHIKX5Z2ISLG33YHAIU7AVCNFSM6AAAAABAASRUUOVHI2DSMVQWIX3LMV43ASLTON2WKOZSGAYTOOBYHEZDQMA . You are receiving this because you are subscribed to this thread.Message ID: @.>

I'm aware of this discussion, but I still feel that this is not a reason to have to destructively update. As a maintainer, you don’t need to spend any special time dealing with the compatibility issues of these old versions, as long as you make sure to accept PRs from the community to deal with related compatibility issues without having a bad impact on new features.

@shanjunmei
Copy link
Author

I have tested that for my needs, I only need these three lines of code, and I can make it run normally in the android6 environment. These three lines of code are predictable and will not affect anyone else.

@pjfanning
Copy link
Member

you can build your own jar based on your own forked code

@shanjunmei
Copy link
Author

you can build your own jar based on your own forked code

I have already done this, but I am worried about missing subsequent updates. Judging from the issue history, this is a very common problem.

@cowtowncoder cowtowncoder changed the title Can compatibility processing be added? I believe that this will not bring much additional performance overhead to the new version, and it is also compatible with the old version. Change jackson-databind to only require Android SDK 23 Nov 30, 2023
@cowtowncoder
Copy link
Member

No. This question has been resurfaced multiple times, and Jackson 2.16+ at very least are not going to be changed in this way. This particular limit in itself would not be a big deal, but there are others and I don't think it is in project's interest to be bound to such an old version of Android platform (esp. given how most usage is not on that platform, and even less on older versions).

Will close as "Will Not Implement": ASDK 26 is the level we currently support and validate against (using Animal Sniffer plug-in for jackson-core and jackson-databind)

@cowtowncoder cowtowncoder closed this as not planned Won't fix, can't repro, duplicate, stale Nov 30, 2023
@shanjunmei
Copy link
Author

No. This question has been resurfaced multiple times, and Jackson 2.16+ at very least are not going to be changed in this way. This particular limit in itself would not be a big deal, but there are others and I don't think it is in project's interest to be bound to such an old version of Android platform (esp. given how most usage is not on that platform, and even less on older versions).

Will close as "Will Not Implement": ASDK 26 is the level we currently support and validate against (using Animal Sniffer plug-in for jackson-core and jackson-databind)

I understand that you are worried about maintenance costs. At your maintenance level, you can make an official announcement and recommend users to use Android 26+. Users who use lower versions are responsible for their own responsibility. You can ignore how users customize and hack.

@shanjunmei
Copy link
Author

No. This question has been resurfaced multiple times, and Jackson 2.16+ at very least are not going to be changed in this way. This particular limit in itself would not be a big deal, but there are others and I don't think it is in project's interest to be bound to such an old version of Android platform (esp. given how most usage is not on that platform, and even less on older versions).

Will close as "Will Not Implement": ASDK 26 is the level we currently support and validate against (using Animal Sniffer plug-in for jackson-core and jackson-databind)
For classes missing in the lower version, it is actually very tricky at the official level, but for those who use it, this is not a problem. It can be extracted from the source code of the higher version, just like third-party dependencies. You don't need to take these risks. Just like desugaring in android development

@shanjunmei
Copy link
Author

Rather than insisting on these weird rules, why not think about cleaning up the weird designs like Java7SupportImpl. I use it in 1.6. I don't use the features of Transient ConstructorProperties at all. Why do I have to let it crash?

@cowtowncoder
Copy link
Member

Fate of Java7SupportImpl has little relevance for Android SDK base level discussion, and will not really make me reconsider this issue at all.

But as per:

https://github.com/FasterXML/jackson-databind/

README, Jackson 2.13.x still supported Android SDK 24 and above. I don't have information regarding earlier versions. 2.14 - 2.16 require ASDK 26.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants