-
Notifications
You must be signed in to change notification settings - Fork 31
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
Proposed Cleanup items for BeanPropertyIntrospector #133
base: 2.17
Are you sure you want to change the base?
Proposed Cleanup items for BeanPropertyIntrospector #133
Conversation
This will need to wait past 2.17 release, considered for 2.18. But one quick note: if changing functionality to static methods, sub-classing no longer possible. |
Ah. Actually... ok, no. I was wrong: there is no way to override it, regardless of my original thinking. Annotation-support package actually has So there is room for re-considering what to do here. After 2.17.0 release :) |
…ity and making it maintainable.
8cc62cf
to
2d2c186
Compare
Can be optimized a bit more, and JavaDocs are remaining. |
public BeanPropertyIntrospector() { } | ||
|
||
public static BeanPropertyIntrospector instance() { return INSTANCE; } | ||
public final class BeanPropertyIntrospector { |
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.
probably can't make a class final in a patch - needs a minor release ideally
|
||
public POJODefinition pojoDefinitionForDeserialization(JSONReader r, Class<?> pojoType) { | ||
return _introspectDefinition(pojoType, false, r.features()); | ||
public static POJODefinition pojoDefinitionForDeserialization(JSONReader r, Class<?> pojoType) { |
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.
can't change a public method to be static in a patch
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.
I get your concern, this change can have unforeseen side-effects.
Currently this is just a proof of concept, to simplify and cleanup this class.
we can take items from here individually (if not all). or not use this at all (whatever is feasible)
I gave it a bit of thought, I believe the documentation is good enough, so not changing anymore. |
A small effort to reduce complexity.
P.S. sorry for formatting, 😂
Reasoning:
BeanPropertyIntrospector is the brain of this library, and it does too much with too little documentation :
Pending Items