ivandika3 commented on code in PR #1142:
URL: https://github.com/apache/ratis/pull/1142#discussion_r1756341402
##########
ratis-server/src/main/java/org/apache/ratis/server/storage/SnapshotManager.java:
##########
@@ -173,9 +172,10 @@ public void installSnapshot(InstallSnapshotRequestProto
request, StateMachine st
}
}
- private MessageDigest newMd5Digest() throws IOException {
+ private void renewMd5Digest() throws IOException {
try {
- return MessageDigest.getInstance("MD5");
+ digester = MessageDigest.getInstance("MD5");
+ digester.reset();
Review Comment:
I think calling `MessageDigest#reset` here is unnecessary since a newly
instantiated `MessageDigest` should already be "reset".
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]