Browse Source

Polishing

pull/29710/head
Sam Brannen 3 years ago
parent
commit
b5b80d0a07
  1. 8
      spring-core/src/main/java/org/springframework/core/env/PropertySource.java

8
spring-core/src/main/java/org/springframework/core/env/PropertySource.java vendored

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2020 the original author or authors.
* Copyright 2002-2022 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.
@ -134,9 +134,9 @@ public abstract class PropertySource<T> { @@ -134,9 +134,9 @@ public abstract class PropertySource<T> {
* <p>No properties other than {@code name} are evaluated.
*/
@Override
public boolean equals(@Nullable Object other) {
return (this == other || (other instanceof PropertySource &&
ObjectUtils.nullSafeEquals(getName(), ((PropertySource<?>) other).getName())));
public boolean equals(@Nullable Object obj) {
return (this == obj || (obj instanceof PropertySource<?> other &&
ObjectUtils.nullSafeEquals(getName(), other.getName())));
}
/**

Loading…
Cancel
Save