szetszwo commented on code in PR #1151:
URL: https://github.com/apache/ratis/pull/1151#discussion_r1766060420


##########
ratis-common/src/main/java/org/apache/ratis/io/MD5Hash.java:
##########
@@ -34,7 +34,9 @@ public class MD5Hash {
 
   public static MessageDigest newDigester() {
     try {
-      return MessageDigest.getInstance("MD5");
+      MessageDigest digester = MessageDigest.getInstance("MD5");
+      digester.reset();

Review Comment:
   According to the API, [ 
MessageDigest.getInstance(..)](https://docs.oracle.com/javase/8/docs/api/java/security/MessageDigest.html#getInstance-java.lang.String-)
 returns a new object.  So, `reset()` is not needed.  



-- 
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]

Reply via email to