Merge branch '6.0.x'
# Conflicts: # spring-context/src/main/java/org/springframework/scheduling/support/CronSequenceGenerator.java
This commit is contained in:
@@ -850,14 +850,9 @@ public abstract class CacheAspectSupport extends AbstractCacheInvoker
|
||||
|
||||
@Override
|
||||
public boolean equals(@Nullable Object other) {
|
||||
if (this == other) {
|
||||
return true;
|
||||
}
|
||||
if (!(other instanceof CacheOperationCacheKey otherKey)) {
|
||||
return false;
|
||||
}
|
||||
return (this.cacheOperation.equals(otherKey.cacheOperation) &&
|
||||
this.methodCacheKey.equals(otherKey.methodCacheKey));
|
||||
return (this == other || (other instanceof CacheOperationCacheKey that &&
|
||||
this.cacheOperation.equals(that.cacheOperation) &&
|
||||
this.methodCacheKey.equals(that.methodCacheKey)));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2020 the original author or authors.
|
||||
* Copyright 2002-2023 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -65,7 +65,7 @@ public class AnnotationConfigApplicationContext extends GenericApplicationContex
|
||||
* through {@link #register} calls and then manually {@linkplain #refresh refreshed}.
|
||||
*/
|
||||
public AnnotationConfigApplicationContext() {
|
||||
StartupStep createAnnotatedBeanDefReader = this.getApplicationStartup().start("spring.context.annotated-bean-reader.create");
|
||||
StartupStep createAnnotatedBeanDefReader = getApplicationStartup().start("spring.context.annotated-bean-reader.create");
|
||||
this.reader = new AnnotatedBeanDefinitionReader(this);
|
||||
createAnnotatedBeanDefReader.end();
|
||||
this.scanner = new ClassPathBeanDefinitionScanner(this);
|
||||
@@ -163,7 +163,7 @@ public class AnnotationConfigApplicationContext extends GenericApplicationContex
|
||||
@Override
|
||||
public void register(Class<?>... componentClasses) {
|
||||
Assert.notEmpty(componentClasses, "At least one component class must be specified");
|
||||
StartupStep registerComponentClass = this.getApplicationStartup().start("spring.context.component-classes.register")
|
||||
StartupStep registerComponentClass = getApplicationStartup().start("spring.context.component-classes.register")
|
||||
.tag("classes", () -> Arrays.toString(componentClasses));
|
||||
this.reader.register(componentClasses);
|
||||
registerComponentClass.end();
|
||||
@@ -180,7 +180,7 @@ public class AnnotationConfigApplicationContext extends GenericApplicationContex
|
||||
@Override
|
||||
public void scan(String... basePackages) {
|
||||
Assert.notEmpty(basePackages, "At least one base package must be specified");
|
||||
StartupStep scanPackages = this.getApplicationStartup().start("spring.context.base-packages.scan")
|
||||
StartupStep scanPackages = getApplicationStartup().start("spring.context.base-packages.scan")
|
||||
.tag("packages", () -> Arrays.toString(basePackages));
|
||||
this.scanner.scan(basePackages);
|
||||
scanPackages.end();
|
||||
|
||||
@@ -397,14 +397,9 @@ public abstract class AbstractApplicationEventMulticaster
|
||||
|
||||
@Override
|
||||
public boolean equals(@Nullable Object other) {
|
||||
if (this == other) {
|
||||
return true;
|
||||
}
|
||||
if (!(other instanceof ListenerCacheKey otherKey)) {
|
||||
return false;
|
||||
}
|
||||
return (this.eventType.equals(otherKey.eventType) &&
|
||||
ObjectUtils.nullSafeEquals(this.sourceType, otherKey.sourceType));
|
||||
return (this == other || (other instanceof ListenerCacheKey that &&
|
||||
this.eventType.equals(that.eventType) &&
|
||||
ObjectUtils.nullSafeEquals(this.sourceType, that.sourceType)));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2021 the original author or authors.
|
||||
* Copyright 2002-2023 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -52,14 +52,9 @@ public final class AnnotatedElementKey implements Comparable<AnnotatedElementKey
|
||||
|
||||
@Override
|
||||
public boolean equals(@Nullable Object other) {
|
||||
if (this == other) {
|
||||
return true;
|
||||
}
|
||||
if (!(other instanceof AnnotatedElementKey otherKey)) {
|
||||
return false;
|
||||
}
|
||||
return (this.element.equals(otherKey.element) &&
|
||||
ObjectUtils.nullSafeEquals(this.targetClass, otherKey.targetClass));
|
||||
return (this == other || (other instanceof AnnotatedElementKey that &&
|
||||
this.element.equals(that.element) &&
|
||||
ObjectUtils.nullSafeEquals(this.targetClass, that.targetClass)));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2021 the original author or authors.
|
||||
* Copyright 2002-2023 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -124,14 +124,9 @@ public abstract class CachedExpressionEvaluator {
|
||||
|
||||
@Override
|
||||
public boolean equals(@Nullable Object other) {
|
||||
if (this == other) {
|
||||
return true;
|
||||
}
|
||||
if (!(other instanceof ExpressionKey otherKey)) {
|
||||
return false;
|
||||
}
|
||||
return (this.element.equals(otherKey.element) &&
|
||||
ObjectUtils.nullSafeEquals(this.expression, otherKey.expression));
|
||||
return (this == other || (other instanceof ExpressionKey that &&
|
||||
this.element.equals(that.element) &&
|
||||
ObjectUtils.nullSafeEquals(this.expression, that.expression)));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -84,7 +84,7 @@ public abstract class AbstractXmlApplicationContext extends AbstractRefreshableC
|
||||
|
||||
// Configure the bean definition reader with this context's
|
||||
// resource loading environment.
|
||||
beanDefinitionReader.setEnvironment(this.getEnvironment());
|
||||
beanDefinitionReader.setEnvironment(getEnvironment());
|
||||
beanDefinitionReader.setResourceLoader(this);
|
||||
beanDefinitionReader.setEntityResolver(new ResourceEntityResolver(this));
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2021 the original author or authors.
|
||||
* Copyright 2002-2023 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -171,15 +171,10 @@ public class DefaultMessageSourceResolvable implements MessageSourceResolvable,
|
||||
|
||||
@Override
|
||||
public boolean equals(@Nullable Object other) {
|
||||
if (this == other) {
|
||||
return true;
|
||||
}
|
||||
if (!(other instanceof MessageSourceResolvable otherResolvable)) {
|
||||
return false;
|
||||
}
|
||||
return (ObjectUtils.nullSafeEquals(getCodes(), otherResolvable.getCodes()) &&
|
||||
ObjectUtils.nullSafeEquals(getArguments(), otherResolvable.getArguments()) &&
|
||||
ObjectUtils.nullSafeEquals(getDefaultMessage(), otherResolvable.getDefaultMessage()));
|
||||
return (this == other || (other instanceof MessageSourceResolvable that &&
|
||||
ObjectUtils.nullSafeEquals(getCodes(), that.getCodes()) &&
|
||||
ObjectUtils.nullSafeEquals(getArguments(), that.getArguments()) &&
|
||||
ObjectUtils.nullSafeEquals(getDefaultMessage(), that.getDefaultMessage())));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -367,13 +367,8 @@ public class FormattingConversionService extends GenericConversionService
|
||||
|
||||
@Override
|
||||
public boolean equals(@Nullable Object other) {
|
||||
if (this == other) {
|
||||
return true;
|
||||
}
|
||||
if (!(other instanceof AnnotationConverterKey otherKey)) {
|
||||
return false;
|
||||
}
|
||||
return (this.fieldType == otherKey.fieldType && this.annotation.equals(otherKey.annotation));
|
||||
return (this == other || (other instanceof AnnotationConverterKey that &&
|
||||
this.fieldType == that.fieldType && this.annotation.equals(that.annotation)));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -655,13 +655,9 @@ public class MBeanClientInterceptor
|
||||
|
||||
@Override
|
||||
public boolean equals(@Nullable Object other) {
|
||||
if (this == other) {
|
||||
return true;
|
||||
}
|
||||
if (!(other instanceof MethodCacheKey otherKey)) {
|
||||
return false;
|
||||
}
|
||||
return (this.name.equals(otherKey.name) && Arrays.equals(this.parameterTypes, otherKey.parameterTypes));
|
||||
return (this == other || (other instanceof MethodCacheKey that &&
|
||||
this.name.equals(that.name) &&
|
||||
Arrays.equals(this.parameterTypes, that.parameterTypes)));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2021 the original author or authors.
|
||||
* Copyright 2002-2023 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -158,16 +158,11 @@ public class NotificationListenerHolder {
|
||||
|
||||
@Override
|
||||
public boolean equals(@Nullable Object other) {
|
||||
if (this == other) {
|
||||
return true;
|
||||
}
|
||||
if (!(other instanceof NotificationListenerHolder otherNlh)) {
|
||||
return false;
|
||||
}
|
||||
return (ObjectUtils.nullSafeEquals(this.notificationListener, otherNlh.notificationListener) &&
|
||||
ObjectUtils.nullSafeEquals(this.notificationFilter, otherNlh.notificationFilter) &&
|
||||
ObjectUtils.nullSafeEquals(this.handback, otherNlh.handback) &&
|
||||
ObjectUtils.nullSafeEquals(this.mappedObjectNames, otherNlh.mappedObjectNames));
|
||||
return (this == other || (other instanceof NotificationListenerHolder that &&
|
||||
ObjectUtils.nullSafeEquals(this.notificationListener, that.notificationListener) &&
|
||||
ObjectUtils.nullSafeEquals(this.notificationFilter, that.notificationFilter) &&
|
||||
ObjectUtils.nullSafeEquals(this.handback, that.handback) &&
|
||||
ObjectUtils.nullSafeEquals(this.mappedObjectNames, that.mappedObjectNames)));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2022 the original author or authors.
|
||||
* Copyright 2002-2023 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -247,15 +247,10 @@ public class PeriodicTrigger implements Trigger {
|
||||
|
||||
@Override
|
||||
public boolean equals(@Nullable Object other) {
|
||||
if (this == other) {
|
||||
return true;
|
||||
}
|
||||
if (!(other instanceof PeriodicTrigger otherTrigger)) {
|
||||
return false;
|
||||
}
|
||||
return (this.fixedRate == otherTrigger.fixedRate &&
|
||||
this.period.equals(otherTrigger.period) &&
|
||||
Objects.equals(this.initialDelay, otherTrigger.initialDelay));
|
||||
return (this == other || (other instanceof PeriodicTrigger that &&
|
||||
this.fixedRate == that.fixedRate &&
|
||||
this.period.equals(that.period) &&
|
||||
Objects.equals(this.initialDelay, that.initialDelay)));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -358,15 +358,10 @@ public abstract class AbstractBindingResult extends AbstractErrors implements Bi
|
||||
|
||||
@Override
|
||||
public boolean equals(@Nullable Object other) {
|
||||
if (this == other) {
|
||||
return true;
|
||||
}
|
||||
if (!(other instanceof BindingResult otherResult)) {
|
||||
return false;
|
||||
}
|
||||
return (getObjectName().equals(otherResult.getObjectName()) &&
|
||||
ObjectUtils.nullSafeEquals(getTarget(), otherResult.getTarget()) &&
|
||||
getAllErrors().equals(otherResult.getAllErrors()));
|
||||
return (this == other || (other instanceof BindingResult that &&
|
||||
getObjectName().equals(that.getObjectName()) &&
|
||||
ObjectUtils.nullSafeEquals(getTarget(), that.getTarget()) &&
|
||||
getAllErrors().equals(that.getAllErrors())));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user