From b926206e50bc3b16bfc637c1f068ea80daa2feea Mon Sep 17 00:00:00 2001 From: cuishuang Date: Sun, 6 Sep 2026 00:41:29 +0800 Subject: [PATCH] Deprecate Bytes.getMD5 overloads for streams and files Signed-off-by: cuishuang --- .../src/main/java/org/apache/dubbo/common/io/Bytes.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dubbo-common/src/main/java/org/apache/dubbo/common/io/Bytes.java b/dubbo-common/src/main/java/org/apache/dubbo/common/io/Bytes.java index abb2339ee2a..e09b391bac7 100644 --- a/dubbo-common/src/main/java/org/apache/dubbo/common/io/Bytes.java +++ b/dubbo-common/src/main/java/org/apache/dubbo/common/io/Bytes.java @@ -843,7 +843,9 @@ public static byte[] getMD5(byte[] source) { * * @param file file source. * @return MD5 byte array. + * @deprecated This method will be removed in the next version. */ + @Deprecated public static byte[] getMD5(File file) throws IOException { InputStream is = new FileInputStream(file); try { @@ -858,7 +860,9 @@ public static byte[] getMD5(File file) throws IOException { * * @param is input stream. * @return MD5 byte array. + * @deprecated This method will be removed in the next version. */ + @Deprecated public static byte[] getMD5(InputStream is) throws IOException { return getMD5(is, 1024 * 8); }