From bc91e0ea96203ccae5a57b5bbe0a567753a5780c Mon Sep 17 00:00:00 2001 From: Sam Brannen <104798+sbrannen@users.noreply.github.com> Date: Tue, 6 May 2025 18:48:19 +0200 Subject: [PATCH] Revise PropertyResolver Javadoc to highlight resolution semantics --- .../core/env/PropertyResolver.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/spring-core/src/main/java/org/springframework/core/env/PropertyResolver.java b/spring-core/src/main/java/org/springframework/core/env/PropertyResolver.java index 173a1a33784..55a7e84968d 100644 --- a/spring-core/src/main/java/org/springframework/core/env/PropertyResolver.java +++ b/spring-core/src/main/java/org/springframework/core/env/PropertyResolver.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2020 the original author or authors. + * Copyright 2002-2025 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. @@ -30,13 +30,13 @@ import org.springframework.lang.Nullable; public interface PropertyResolver { /** - * Return whether the given property key is available for resolution, - * i.e. if the value for the given key is not {@code null}. + * Determine whether the given property key is available for resolution + * — for example, if the value for the given key is not {@code null}. */ boolean containsProperty(String key); /** - * Return the property value associated with the given key, + * Resolve the property value associated with the given key, * or {@code null} if the key cannot be resolved. * @param key the property name to resolve * @see #getProperty(String, String) @@ -47,7 +47,7 @@ public interface PropertyResolver { String getProperty(String key); /** - * Return the property value associated with the given key, or + * Resolve the property value associated with the given key, or * {@code defaultValue} if the key cannot be resolved. * @param key the property name to resolve * @param defaultValue the default value to return if no value is found @@ -57,7 +57,7 @@ public interface PropertyResolver { String getProperty(String key, String defaultValue); /** - * Return the property value associated with the given key, + * Resolve the property value associated with the given key, * or {@code null} if the key cannot be resolved. * @param key the property name to resolve * @param targetType the expected type of the property value @@ -67,7 +67,7 @@ public interface PropertyResolver { T getProperty(String key, Class targetType); /** - * Return the property value associated with the given key, + * Resolve the property value associated with the given key, * or {@code defaultValue} if the key cannot be resolved. * @param key the property name to resolve * @param targetType the expected type of the property value @@ -77,14 +77,14 @@ public interface PropertyResolver { T getProperty(String key, Class targetType, T defaultValue); /** - * Return the property value associated with the given key (never {@code null}). + * Resolve the property value associated with the given key (never {@code null}). * @throws IllegalStateException if the key cannot be resolved * @see #getRequiredProperty(String, Class) */ String getRequiredProperty(String key) throws IllegalStateException; /** - * Return the property value associated with the given key, converted to the given + * Resolve the property value associated with the given key, converted to the given * targetType (never {@code null}). * @throws IllegalStateException if the given key cannot be resolved */