Merge branch '6.0.x'

This commit is contained in:
Juergen Hoeller
2023-08-04 02:40:17 +02:00
56 changed files with 198 additions and 288 deletions

View File

@@ -61,9 +61,8 @@ public class SimpleKey implements Serializable {
@Override
public boolean equals(@Nullable Object obj) {
return (this == obj ||
(obj instanceof SimpleKey that && Arrays.deepEquals(this.params, that.params)));
public boolean equals(@Nullable Object other) {
return (this == other || (other instanceof SimpleKey that && Arrays.deepEquals(this.params, that.params)));
}
@Override

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 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.
@@ -50,8 +50,8 @@ public final class NullValue implements Serializable {
@Override
public boolean equals(@Nullable Object obj) {
return (this == obj || obj == null);
public boolean equals(@Nullable Object other) {
return (this == other || other == null);
}
@Override

View File

@@ -39,6 +39,7 @@ final class BeanMethod extends ConfigurationMethod {
super(metadata, configurationClass);
}
@Override
public void validate(ProblemReporter problemReporter) {
if (getMetadata().isStatic()) {
@@ -55,9 +56,8 @@ final class BeanMethod extends ConfigurationMethod {
}
@Override
public boolean equals(@Nullable Object obj) {
return (this == obj ||
(obj instanceof BeanMethod that && this.metadata.equals(that.metadata)));
public boolean equals(@Nullable Object other) {
return (this == other || (other instanceof BeanMethod that && this.metadata.equals(that.metadata)));
}
@Override
@@ -70,6 +70,7 @@ final class BeanMethod extends ConfigurationMethod {
return "BeanMethod: " + this.metadata;
}
private class NonOverridableMethodError extends Problem {
NonOverridableMethodError() {

View File

@@ -237,8 +237,8 @@ final class ConfigurationClass {
}
@Override
public boolean equals(@Nullable Object obj) {
return (this == obj || (obj instanceof ConfigurationClass that &&
public boolean equals(@Nullable Object other) {
return (this == other || (other instanceof ConfigurationClass that &&
getMetadata().getClassName().equals(that.getMetadata().getClassName())));
}

View File

@@ -211,8 +211,8 @@ class ConfigurationClassParser {
}
List<PropertySourceDescriptor> getPropertySourceDescriptors() {
return (this.propertySourceRegistry != null ? this.propertySourceRegistry.getDescriptors()
: Collections.emptyList());
return (this.propertySourceRegistry != null ? this.propertySourceRegistry.getDescriptors() :
Collections.emptyList());
}
protected void processConfigurationClass(ConfigurationClass configClass, Predicate<String> filter) throws IOException {
@@ -1005,8 +1005,8 @@ class ConfigurationClassParser {
}
@Override
public boolean equals(@Nullable Object obj) {
return (this == obj || (obj instanceof SourceClass that &&
public boolean equals(@Nullable Object other) {
return (this == other || (other instanceof SourceClass that &&
this.metadata.getClassName().equals(that.metadata.getClassName())));
}