From 114fa47171e666cfd2214cf436f99c267b6a2d7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A1=D0=B5=D1=80=D0=B3=D0=B5=D0=B9=20=D0=A6=D1=8B=D0=BF?= =?UTF-8?q?=D0=B0=D0=BD=D0=BE=D0=B2?= Date: Mon, 11 Oct 2021 10:55:00 +0300 Subject: [PATCH] Use Arrays.hashCode() in ByteArrayResource.hashCode() --- .../java/org/springframework/core/io/ByteArrayResource.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-core/src/main/java/org/springframework/core/io/ByteArrayResource.java b/spring-core/src/main/java/org/springframework/core/io/ByteArrayResource.java index 359d6b8574b..6a2e666b6b1 100644 --- a/spring-core/src/main/java/org/springframework/core/io/ByteArrayResource.java +++ b/spring-core/src/main/java/org/springframework/core/io/ByteArrayResource.java @@ -126,7 +126,7 @@ public class ByteArrayResource extends AbstractResource { */ @Override public int hashCode() { - return (byte[].class.hashCode() * 29 * this.byteArray.length); + return Arrays.hashCode(byteArray); } }