From 77a85fd18068ae4ddf08a5ce6283319c439478ae Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Wed, 13 Sep 2023 18:04:55 +0200 Subject: [PATCH] Fix deprecation in Spring Framework --- .../filter/AnnotationCustomizableTypeExcludeFilter.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/filter/AnnotationCustomizableTypeExcludeFilter.java b/spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/filter/AnnotationCustomizableTypeExcludeFilter.java index af92b8a1541..807c4a7d9cf 100644 --- a/spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/filter/AnnotationCustomizableTypeExcludeFilter.java +++ b/spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/filter/AnnotationCustomizableTypeExcludeFilter.java @@ -18,6 +18,8 @@ package org.springframework.boot.test.autoconfigure.filter; import java.io.IOException; import java.lang.annotation.Annotation; +import java.util.Arrays; +import java.util.Objects; import java.util.Set; import org.springframework.beans.factory.BeanClassLoaderAware; @@ -135,11 +137,11 @@ public abstract class AnnotationCustomizableTypeExcludeFilter extends TypeExclud int result = 0; result = prime * result + Boolean.hashCode(hasAnnotation()); for (FilterType filterType : FilterType.values()) { - result = prime * result + ObjectUtils.nullSafeHashCode(getFilters(filterType)); + result = prime * result + Arrays.hashCode(getFilters(filterType)); } result = prime * result + Boolean.hashCode(isUseDefaultFilters()); - result = prime * result + ObjectUtils.nullSafeHashCode(getDefaultIncludes()); - result = prime * result + ObjectUtils.nullSafeHashCode(getComponentIncludes()); + result = prime * result + Objects.hashCode(getDefaultIncludes()); + result = prime * result + Objects.hashCode(getComponentIncludes()); return result; }