reschke commented on code in PR #2372:
URL: https://github.com/apache/jackrabbit-oak/pull/2372#discussion_r2192163034


##########
oak-store-spi/src/main/java/org/apache/jackrabbit/oak/plugins/memory/AbstractBlob.java:
##########
@@ -189,4 +182,39 @@ public String toString() {
         return getSha256().toString();
     }
 
+    public static class HashCode {
+
+        private byte[] digest;
+
+        private HashCode(byte[] digest){
+            this.digest = digest;
+        }
+
+        private static HashCode of(byte[] bytes) {
+            try {
+                return new 
HashCode(MessageDigest.getInstance("SHA-256").digest(bytes));
+            } catch (NoSuchAlgorithmException ex) {
+                throw new IllegalStateException("no SHA256 digest", ex);
+            }
+        }
+
+        @Override
+        public boolean equals(Object o) {
+            if (o == null || getClass() != o.getClass()) return false;

Review Comment:
   It was generated by IntelliJ :-)



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