-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Move jackson-datatype-jsr310
into jackson-databind
#5032
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
Conversation
@@ -0,0 +1,226 @@ | |||
/* |
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.
Good -- I like this idea -- making it work much like modules, without having to be one.
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.
Looks good so far -- aside from maybe changing package I think this would work.
LGTM: what do you think @JooHyukKim? (since you are module maintainer) |
@cowtowncoder yes! LGTM at high level.
@pjfanning you are saying its WIP, may I ask what the remaining pieces are? |
I'm happy to treat this as ready to merge at this stage. |
Just one concern I have is how easy it would be to forward merge changes in Jackson 2 version of jsr310 module, good thing is that the module itself does not have frequent changes |
That is a valid concern. Not sure we can do a lot about it. I feel merging still makes sense, tho, overall. WDYT? |
I think the JSR310 support is pretty stable. Forward fitting to master (3.0) branches is fairly complicated already. This change doesn't really even make it much more complicated. |
While there are some kinks to be sure (git seems to lose tracking of some heavily changed renamed classes), overall for modules forward merging has been doable. So I agree, it's just a degree of additional complexity. So I think we can live with it. WDYT @JooHyukKim ? |
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.
LGTM!
* | ||
* @since 2.16 | ||
*/ | ||
public enum JavaTimeFeature implements JacksonFeature |
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.
If possible, I think we should actually change the idea here to create new DateTimeFeature
that should ideally control ALL date/time handling (mostly concerning then old java.util
Date/Calendar and Joda date/time).
It would contain entries we have here, initially, but then see if we could move existing DeserializationFeature
s/SerializationFeature
s that are date/time specific into this new enum.
This would then be a building block for
https://github.com/FasterXML/jackson-future-ideas/wiki/JSTEP-5
Finally, renamed DateTimeFeature
should go in tools.jackson.databind.cfg
along with existing EnumFeature
and JsonNodeFeature
.
@pjfanning Like I said, this now makes sense. Had a last minute idea for renaming/repurposing |
I think conversion of EDIT: noticed one thing after writing this (see below) -- the way |
/** | ||
* States of {@link JavaTimeFeature}s to enable/disable. | ||
*/ | ||
protected JacksonFeatureSet<JavaTimeFeature> _javaTimeFeatures = |
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.
Ahhhh. Ok, here's something we'll need to change: new JavaTimeFeature
(or eventual DateTimeFeature
) can and should be added as 3rd thing in DatatypeFeatures
(along with EnumFeature
and JsonNodeFeature
) -- it's designed to be extended.
I can do that tomorrow.
@pjfanning @JooHyukKim I did last tweaking, renaming and am ready to merge this in. Renamed so that
Beyond merging this big PR I will start filing issues for
and hopefully we can address (most of) these for 3.0.0-rc3. |
jackson-datatype-jsr310
into jackson-databind
@cowtowncoder if you have time, would you be able to review the change from a high level?