Skip to content

Conversation

eranl
Copy link

@eranl eranl commented Oct 18, 2025

Make @JsonAnySetter creator properties behave similarly to non-creator ones, using a LinkedHashMap.
Since the arguments are stored in a reverse-order singly-linked list, I used recursion to restore the original order. Any better way to do it?

Fixes #5353.

@cowtowncoder
Copy link
Member

I think we'd first need an issue explaining what is the problem to fix.

@cowtowncoder
Copy link
Member

Ok, use of LinkedHashMap in itself is acceptable, retaining order possibly useful, with modest (probably non-measurable) overhead.

But adding overhead of reordering for every use is not good -- many users would get penalized despite not caring about ordering.

So if we can figure out how to insert values in order, +1.

@JooHyukKim knows this area pretty well and can probably help.

@eranl
Copy link
Author

eranl commented Oct 20, 2025

But adding overhead of reordering for every use is not good -- many users would get penalized despite not caring about ordering.

You mean the recursion? Is that measurable?

@cowtowncoder
Copy link
Member

But adding overhead of reordering for every use is not good -- many users would get penalized despite not caring about ordering.

You mean the recursion? Is that measurable?

No I mean reordering in general; should be possible to just retain insert order without essentially ordering twice.

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

Successfully merging this pull request may close these issues.

2 participants