SOLR-14301: Remove external commons-codec usage in gradle validateJarChecksums#2309
Open
asalamon74 wants to merge 1 commit intoapache:masterfrom
Open
SOLR-14301: Remove external commons-codec usage in gradle validateJarChecksums#2309asalamon74 wants to merge 1 commit intoapache:masterfrom
asalamon74 wants to merge 1 commit intoapache:masterfrom
Conversation
Contributor
|
I believe this was done with an external dependency because there's an issue with how checksums were handled on Windows, but I don't remember all the details and can't find it now. Maybe @dweiss can remember. We also do the same thing in |
Contributor
|
I think it's just much shorter invocation in the end - when you look at the diff you'll see it. I also don't know if the checksum format is required to be supported by the JDK. |
Contributor
Author
|
Yes, the invocation is longer with this patch, on the other hand we avoid using an external library so the .gradle file is shorter. We only require that SHA-1 is supported by the JDK, which is a requirement for all JDK implementations: https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…Checksums
Description
Right now gradle calculates SHA-1 checksums using an external commons-codec library. We can calculate SHA-1 using Java 8 classes, no need for commons-codec here.
Solution
Eliminate commons-codec usage in checksum validation.
Tests
./gradlew validateJarChecksums
Checklist
Please review the following and check all that apply:
masterbranch../gradlew check.