-
Notifications
You must be signed in to change notification settings - Fork 1
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
Bump the depended Jackson version to 2.15.3 #58
Conversation
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👍 Left minor comments.
|
||
final int minor = com.fasterxml.jackson.databind.cfg.PackageVersion.VERSION.getMinorVersion(); | ||
if (minor < 14 || (minor == 15 && com.fasterxml.jackson.databind.cfg.PackageVersion.VERSION.getPatchLevel() <= 2)) { | ||
throw new UnsupportedOperationException("embulk-util-config is not used with Jackson 2.15.3 or later."); |
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.
What do you think about adding databind
in the log message?
I'm wondering that line 333 and here use the same error message.
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.
Thanks! Sounds reasonable. Fixed it like "embulk-util-config is not used with Jackson (jackson-databind) 2.15.3 or later."
|
||
final int minor = com.fasterxml.jackson.datatype.jdk8.PackageVersion.VERSION.getMinorVersion(); | ||
if (minor < 14 || (minor == 15 && com.fasterxml.jackson.datatype.jdk8.PackageVersion.VERSION.getPatchLevel() <= 2)) { | ||
throw new UnsupportedOperationException("embulk-util-config is not used with Jackson 2.15.3 or later."); |
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.
ditto
Thanks for your comments! Addressed them. Merging it! |
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.
Sorry, I've missed point out another part. Please check for future development.
|
||
private static void assertJacksonDataBindVersion() { | ||
if (com.fasterxml.jackson.databind.cfg.PackageVersion.VERSION.getMajorVersion() != 2) { | ||
throw new UnsupportedOperationException("embulk-util-config is not used with Jackson 2."); |
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've missed point out this part.
Please create another PR when this change useful.
embulk-util-config is not used with Jackson(jackson-databind) 2.
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 basically don't think it's needed for this part.
Jackson 1 had different Java package names (org.codehaus.jackson.*
) and Jackson 3 is going to have yet another Java package names (tools.jackson.*
). While using Jackson 2 (com.fasterxml.jackson.*
), the major version should be always 2.
This part is practically just an assertion. When it happens, that's not a simple problem anyway. ;)
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 got it. Thanks! LGTM👍
A fix in Jackson 2.15.3 is needed to enable this fix embulk/embulk-util-json#33 (comment)
FasterXML/jackson-core#1111
It's time to upgrade the depended Jackson to the latest!