Merge branch '6.0.x'

# Conflicts:
#	spring-context/src/main/java/org/springframework/scheduling/support/CronSequenceGenerator.java
This commit is contained in:
Juergen Hoeller
2023-07-19 00:37:06 +02:00
97 changed files with 405 additions and 822 deletions

View File

@@ -65,10 +65,8 @@ public class SerializablePerson implements Person, Serializable {
@Override
public boolean equals(@Nullable Object other) {
if (!(other instanceof SerializablePerson p)) {
return false;
}
return p.age == age && ObjectUtils.nullSafeEquals(name, p.name);
return (this == other || (other instanceof SerializablePerson that &&
ObjectUtils.nullSafeEquals(this.name, that.name) && this.age == that.age));
}
@Override

View File

@@ -466,18 +466,13 @@ public class TestBean implements BeanNameAware, BeanFactoryAware, ITestBean, IOt
@Override
public boolean equals(@Nullable Object other) {
if (this == other) {
return true;
}
if (!(other instanceof TestBean tb2)) {
return false;
}
return (ObjectUtils.nullSafeEquals(this.name, tb2.name) && this.age == tb2.age);
return (this == other || (other instanceof TestBean that &&
ObjectUtils.nullSafeEquals(this.name, that.name) && this.age == that.age));
}
@Override
public int hashCode() {
return this.age;
return TestBean.class.hashCode();
}
@Override