-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Migrate legacy reflection properties to use MethodHandles, take 2 #5090
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
base: 3.x
Are you sure you want to change the base?
Migrate legacy reflection properties to use MethodHandles, take 2 #5090
Conversation
fb6aa3f
to
9d9b7d7
Compare
Sorry the first attempt did not go so well, but here is try #2. Instead of changing any of the rules around set accessible, defer using the method / constructors / etc until first-use. I've tested this works with |
9d9b7d7
to
5309694
Compare
Ok, with FasterXML/jackson-modules-base#295, |
c10f758
to
2b57c71
Compare
2b57c71
to
f04fb75
Compare
@stevenschlansker I think I will merge this post rc3 (which I hope to release maybe this weekend). |
Ok made small change ( |
Thanks - please let me know if there's any additional changes needed or validation I should perform. |
@cowtowncoder , while working on this, I ran into the |
@stevenschlansker Sounds like a good idea at high level. Unfortunately I don't have more context on this (as in, haven't worked in those aspects lately) so say much about feasibility. I'll try to get #5094 in tonight, to be done with bigger messing up of introspection, to stabilize things. |
@stevenschlansker Not sure how much (if at all) this helps, but with #5143 I removed What else do we need to help with issue you mentioned wrt |
_throwAsJacksonE(ctxt.getParser(), e, value); | ||
return null; | ||
} | ||
} | ||
|
||
class SetterHolder extends UnreflectHandleSupplier { | ||
private static final long serialVersionUID = 1L; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Almost certainly no longer needed (I removed most implements java.io.Serializable
cases in #5143)
@stevenschlansker Hoping to merge this in right before 3.0.0-rc4 -- anything you want to change before merging? (we can still do follow-ups of course) |
I'm pretty sure I figured out the main reason the previous attempt (#5046) did not work - in order to read modules from databind, we still have to call
setAccessible(true)
which was happening too late due to the virtual method e.g.BeanPropertyWriter.fixAccess
happening after constructor finishes.Work around this by using a lazy memoized Setter class. Also ends up helping to simplify some serialization wonkiness.
Fixes #2083