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

Add support for Guava ImmutableIntArray / ImmutableDoubleArray #157

Open
wants to merge 4 commits into
base: 2.18
Choose a base branch
from

Conversation

kilink
Copy link

@kilink kilink commented Aug 22, 2024

Add serde support for ImmutableIntArray and ImmutableDoubleArray.

Note that for simplicity, the deserializers currently delegate to the implementations in PrimitiveArrayDeserializers, passing the deserialize primitive arrays to the respective copyOf factory methods. The benefit is that all of the various edge cases of reading ints / doubles is handled already in those implementations. The downside is that we make an extra copy of the array when we pass it to the copyOf method, but at least there is no waste in the array sizing in this case.

Add serde support for ImmutableIntArray and ImmutableDoubleArray.
@yawkat
Copy link
Member

yawkat commented Aug 27, 2024

LGTM, but have you already signed the CLA?

@cowtowncoder cowtowncoder changed the title Add support for ImmutableIntArray / ImmutableDoubleArray Add support for Guava ImmutableIntArray / ImmutableDoubleArray Aug 27, 2024
@cowtowncoder
Copy link
Member

Ah yes -- happy to help get this reviewed, but before merging will need CLA (if not already sent earlier; only needs to be done once before the first contribution). It's this:

https://github.com/FasterXML/jackson/blob/master/contributor-agreement.pdf

and the usual way is to print, fill & sign, scan/photo, email to cla at fasterxml dot com.
ONce this is done I can proceed with merging (assuming review goes fine etc).

@kilink
Copy link
Author

kilink commented Aug 27, 2024

Sure, I can get the CLA signed; but also I realized that ImmutableIntArray / ImmutableDoubleArray were added in Guava 22.0, so this change cannot really be merged anyway if the minimum supported Guava version is still 20. For some reason I thought these classes had been around much longer.

@cowtowncoder
Copy link
Member

cowtowncoder commented Aug 27, 2024

Ok, one immediate problem tho: looks like our CI is still assuming min Guava level of 20, and ImmutableIntArray was added in Guava 22 (as per Javadocs).
Note that this is different from default dependency indicated, Guava 25.

So: do we want to bump minimum supported Guava to 22 for Jackson 2.18?
I don't have strong opinion here, but will need to file separate issue to increase that, if agreed.

EDIT: filed #158

@cowtowncoder
Copy link
Member

@kilink One possibility: postpone Guava baseline upgrade to Jackson 2.19, merge this in after 2.18.0 released? This gives us more time.

@kilink
Copy link
Author

kilink commented Aug 28, 2024

@kilink One possibility: postpone Guava baseline upgrade to Jackson 2.19, merge this in after 2.18.0 released? This gives us more time.

I'm fine with that. Not really an urgent need for this, I just saw it as a gap. I can continue just using the custom serializers / deserializers directly for now.

@cowtowncoder cowtowncoder added the cla-needed PR requires CLA before merging (not yet provided by author) label Nov 5, 2024
@cowtowncoder
Copy link
Member

Would like to proceed with this, wrt merging into 2.19, but need 2 things:

  1. PR needs to re-based (or re-created against 2.19)
  2. CLA

with that, I'd be happy to merge this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.19 cla-needed PR requires CLA before merging (not yet provided by author) guava
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants