This is an automated email from the ASF dual-hosted git repository.

adoroszlai pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ozone.git


The following commit(s) were added to refs/heads/master by this push:
     new 8df9cfb7217 HDDS-15689. Compare MD5Hash directly in 
ScmInvokerCodeGenerator (#10618)
8df9cfb7217 is described below

commit 8df9cfb72179df945db3d0e00718b38c292e68b2
Author: Doroszlai, Attila <[email protected]>
AuthorDate: Sat Jun 27 08:20:55 2026 +0200

    HDDS-15689. Compare MD5Hash directly in ScmInvokerCodeGenerator (#10618)
---
 .../org/apache/hadoop/hdds/scm/ha/invoker/ScmInvokerCodeGenerator.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git 
a/hadoop-hdds/server-scm/src/test/java/org/apache/hadoop/hdds/scm/ha/invoker/ScmInvokerCodeGenerator.java
 
b/hadoop-hdds/server-scm/src/test/java/org/apache/hadoop/hdds/scm/ha/invoker/ScmInvokerCodeGenerator.java
index 4ecc6263f78..b102ec99041 100644
--- 
a/hadoop-hdds/server-scm/src/test/java/org/apache/hadoop/hdds/scm/ha/invoker/ScmInvokerCodeGenerator.java
+++ 
b/hadoop-hdds/server-scm/src/test/java/org/apache/hadoop/hdds/scm/ha/invoker/ScmInvokerCodeGenerator.java
@@ -41,6 +41,7 @@
 import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.Map;
+import java.util.Objects;
 import java.util.concurrent.atomic.AtomicInteger;
 import java.util.function.Function;
 import java.util.function.Predicate;
@@ -642,7 +643,7 @@ File updateFile(String classString, String dir, boolean 
overwrite) throws IOExce
 
     final MD5Hash javaMd5 = MD5FileUtil.computeMd5ForFile(java);
     final MD5Hash tmpMd5 = MD5FileUtil.computeMd5ForFile(tmp);
-    if (Arrays.equals(javaMd5.getDigest(), tmpMd5.getDigest())) {
+    if (Objects.equals(javaMd5, tmpMd5)) {
       Files.delete(tmp.toPath());
       return null;
     }


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to