From b5b80d0a07bff28a14e22c9482e4d9335668dc97 Mon Sep 17 00:00:00 2001 From: Sam Brannen Date: Fri, 16 Dec 2022 14:50:02 +0100 Subject: [PATCH] Polishing --- .../java/org/springframework/core/env/PropertySource.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/spring-core/src/main/java/org/springframework/core/env/PropertySource.java b/spring-core/src/main/java/org/springframework/core/env/PropertySource.java index 868fdfa505..a88223c941 100644 --- a/spring-core/src/main/java/org/springframework/core/env/PropertySource.java +++ b/spring-core/src/main/java/org/springframework/core/env/PropertySource.java @@ -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 { *

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()))); } /**