-
Notifications
You must be signed in to change notification settings - Fork 298
Remove commons-codec dependency #2474
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
} | ||
|
||
public static String sha256Hex(String input) { | ||
return Hashing.sha256().hashString(input, StandardCharsets.UTF_8).toString(); |
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.
some basic local testing to confirm this produces the same results as org.apache.polaris.core.DigestUtils.sha256Hex
:
Input:
guava -> e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
codec -> e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
Input: foobar
guava -> c3ab8ff13720e8ad9047dd39466b3c8974e592c2fa383d4a3960714caef0c4f2
codec -> c3ab8ff13720e8ad9047dd39466b3c8974e592c2fa383d4a3960714caef0c4f2
Input: ajsdljaksl-92301928i390!@#$%^&*()_+
guava -> ee7a434dd148156b40dd00ad567c37dea7297ebccb6df0f7a5be064c97dcb18b
codec -> ee7a434dd148156b40dd00ad567c37dea7297ebccb6df0f7a5be064c97dcb18b
Input: 😀
guava -> f0443a342c5ef54783a111b51ba56c938e474c32324d90c3a60c9c8e3a37e2d9
codec -> f0443a342c5ef54783a111b51ba56c938e474c32324d90c3a60c9c8e3a37e2d9
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.
That sounds reasonable to me. I would suggest to update LICENSE to remove commons-codec mention there.
4f69623
to
2bdd239
Compare
thanks for the review
i think while this PR removes a direct dependency on the library we still depend on it transitively and thus it ends up in our binary distribution:
doesnt that mean we have to keep it in the LICENSE file? generally wondering whether we have plans to move towards automatic creation/update of that file? |
Yes, as it's still shipped in the distribution, we have to keep in the I will open another PR to simplify a bit By the way, I have a script to check the versions/dependency in the distributions. |
2bdd239
to
ffd4310
Compare
follow-up to f8ad77a we can simply use guava instead and eliminate the extra dependency
ffd4310
to
4666358
Compare
follow-up to f8ad77a
we can simply use guava instead and eliminate the extra dependency