This commit deprecates the various nullSafeHashCode methods taking array
types as they are superseded by Arrays.hashCode now. This means that
the now only remaining nullSafeHashCode method does not trigger a
warning only if the target type is not an array. At the same time, there
are multiple use of this method on several elements, handling the
accumulation of hash codes.
For that reason, this commit also introduces a nullSafeHash that takes
an array of elements. The only difference between Objects.hash is that
this method handles arrays.
The codebase has been reviewed to use any of those two methods when it
is possible.
Closes gh-29051
@ -525,11 +525,8 @@ public class AspectJExpressionPointcut extends AbstractExpressionPointcut
@@ -525,11 +525,8 @@ public class AspectJExpressionPointcut extends AbstractExpressionPointcut
@ -124,7 +126,7 @@ public class TypePatternClassFilter implements ClassFilter {
@@ -124,7 +126,7 @@ public class TypePatternClassFilter implements ClassFilter {
@ -190,7 +191,7 @@ public abstract class AbstractBeanFactoryBasedTargetSource implements TargetSour
@@ -190,7 +191,7 @@ public abstract class AbstractBeanFactoryBasedTargetSource implements TargetSour
@ -140,7 +141,7 @@ public final class EmptyTargetSource implements TargetSource, Serializable {
@@ -140,7 +141,7 @@ public final class EmptyTargetSource implements TargetSource, Serializable {
@ -90,7 +90,7 @@ public class BeanMetadataAttribute implements BeanMetadataElement {
@@ -90,7 +90,7 @@ public class BeanMetadataAttribute implements BeanMetadataElement {
@ -172,10 +172,7 @@ final class GenericTypeAwarePropertyDescriptor extends PropertyDescriptor {
@@ -172,10 +172,7 @@ final class GenericTypeAwarePropertyDescriptor extends PropertyDescriptor {
@ -197,7 +197,7 @@ public class PropertyValue extends BeanMetadataAttributeAccessor implements Seri
@@ -197,7 +197,7 @@ public class PropertyValue extends BeanMetadataAttributeAccessor implements Seri
@ -173,10 +173,8 @@ public class BeanDefinitionHolder implements BeanMetadataElement {
@@ -173,10 +173,8 @@ public class BeanDefinitionHolder implements BeanMetadataElement {
@ -223,7 +223,7 @@ public class TypedStringValue implements BeanMetadataElement {
@@ -223,7 +223,7 @@ public class TypedStringValue implements BeanMetadataElement {
@ -404,7 +405,7 @@ public abstract class AbstractApplicationEventMulticaster
@@ -404,7 +405,7 @@ public abstract class AbstractApplicationEventMulticaster
@ -179,10 +179,7 @@ public class DefaultMessageSourceResolvable implements MessageSourceResolvable,
@@ -179,10 +179,7 @@ public class DefaultMessageSourceResolvable implements MessageSourceResolvable,
@ -539,7 +540,7 @@ public class MultiServerUserRegistry implements SimpUserRegistry, SmartApplicati
@@ -539,7 +540,7 @@ public class MultiServerUserRegistry implements SimpUserRegistry, SmartApplicati
@ -66,7 +68,7 @@ public class TestSimpSubscription implements SimpSubscription {
@@ -66,7 +68,7 @@ public class TestSimpSubscription implements SimpSubscription {
@ -566,14 +567,8 @@ final class HierarchicalUriComponents extends UriComponents {
@@ -566,14 +567,8 @@ final class HierarchicalUriComponents extends UriComponents {
@ -166,10 +167,7 @@ final class OpaqueUriComponents extends UriComponents {
@@ -166,10 +167,7 @@ final class OpaqueUriComponents extends UriComponents {
@ -213,7 +214,7 @@ public final class CloseStatus implements Serializable {
@@ -213,7 +214,7 @@ public final class CloseStatus implements Serializable {