Polishing
This commit is contained in:
parent
69e4cc5576
commit
be70b675c6
|
|
@ -37,7 +37,7 @@ import org.springframework.test.context.MergedContextConfiguration;
|
|||
* @author Sam Brannen
|
||||
* @since 6.0
|
||||
*/
|
||||
class AotMergedContextConfiguration extends MergedContextConfiguration {
|
||||
final class AotMergedContextConfiguration extends MergedContextConfiguration {
|
||||
|
||||
private static final long serialVersionUID = 1963364911008547843L;
|
||||
|
||||
|
|
@ -71,33 +71,13 @@ class AotMergedContextConfiguration extends MergedContextConfiguration {
|
|||
if (this == other) {
|
||||
return true;
|
||||
}
|
||||
if (other == null || other.getClass() != getClass()) {
|
||||
return false;
|
||||
}
|
||||
AotMergedContextConfiguration that = (AotMergedContextConfiguration) other;
|
||||
if (!this.contextInitializerClass.equals(that.contextInitializerClass)) {
|
||||
return false;
|
||||
}
|
||||
if (!nullSafeClassName(getContextLoader()).equals(nullSafeClassName(that.getContextLoader()))) {
|
||||
return false;
|
||||
}
|
||||
if (getParent() == null) {
|
||||
if (that.getParent() != null) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else if (!getParent().equals(that.getParent())) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
return ((other instanceof AotMergedContextConfiguration that) &&
|
||||
this.contextInitializerClass.equals(that.contextInitializerClass));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int result = this.contextInitializerClass.hashCode();
|
||||
result = 31 * result + nullSafeClassName(getContextLoader()).hashCode();
|
||||
result = 31 * result + (getParent() != null ? getParent().hashCode() : 0);
|
||||
return result;
|
||||
return this.contextInitializerClass.hashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
Loading…
Reference in New Issue