diff --git a/spring-core/src/main/java/org/springframework/core/env/AbstractEnvironment.java b/spring-core/src/main/java/org/springframework/core/env/AbstractEnvironment.java index de1e84c535b..f45241726d6 100644 --- a/spring-core/src/main/java/org/springframework/core/env/AbstractEnvironment.java +++ b/spring-core/src/main/java/org/springframework/core/env/AbstractEnvironment.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2024 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. @@ -42,7 +42,7 @@ import org.springframework.util.StringUtils; * add by default. {@code AbstractEnvironment} adds none. Subclasses should contribute * property sources through the protected {@link #customizePropertySources(MutablePropertySources)} * hook, while clients should customize using {@link ConfigurableEnvironment#getPropertySources()} - * and working against the {@link MutablePropertySources} API. + * and work against the {@link MutablePropertySources} API. * See {@link ConfigurableEnvironment} javadoc for usage examples. * * @author Chris Beams @@ -66,7 +66,7 @@ public abstract class AbstractEnvironment implements ConfigurableEnvironment { public static final String IGNORE_GETENV_PROPERTY_NAME = "spring.getenv.ignore"; /** - * Name of the property to set to specify active profiles: {@value}. + * Name of the property to specify active profiles: {@value}. *
The value may be comma delimited. *
Note that certain shell environments such as Bash disallow the use of the period * character in variable names. Assuming that Spring's {@link SystemEnvironmentPropertySource} @@ -77,7 +77,7 @@ public abstract class AbstractEnvironment implements ConfigurableEnvironment { public static final String ACTIVE_PROFILES_PROPERTY_NAME = "spring.profiles.active"; /** - * Name of the property to set to specify profiles that are active by default: {@value}. + * Name of the property to specify profiles that are active by default: {@value}. *
The value may be comma delimited. *
Note that certain shell environments such as Bash disallow the use of the period * character in variable names. Assuming that Spring's {@link SystemEnvironmentPropertySource} @@ -141,7 +141,7 @@ public abstract class AbstractEnvironment implements ConfigurableEnvironment { /** * Factory method used to create the {@link ConfigurablePropertyResolver} - * instance used by the Environment. + * used by this {@code Environment}. * @since 5.3.4 * @see #getPropertyResolver() */ @@ -150,8 +150,7 @@ public abstract class AbstractEnvironment implements ConfigurableEnvironment { } /** - * Return the {@link ConfigurablePropertyResolver} being used by the - * {@link Environment}. + * Return the {@link ConfigurablePropertyResolver} used by the {@code Environment}. * @since 5.3.4 * @see #createPropertyResolver(MutablePropertySources) */ @@ -320,7 +319,6 @@ public abstract class AbstractEnvironment implements ConfigurableEnvironment { } } - @Override public String[] getDefaultProfiles() { return StringUtils.toStringArray(doGetDefaultProfiles()); @@ -328,7 +326,7 @@ public abstract class AbstractEnvironment implements ConfigurableEnvironment { /** * Return the set of default profiles explicitly set via - * {@link #setDefaultProfiles(String...)} or if the current set of default profiles + * {@link #setDefaultProfiles(String...)}, or if the current set of default profiles * consists only of {@linkplain #getReservedDefaultProfiles() reserved default * profiles}, then check for the presence of {@link #doGetActiveProfilesProperty()} * and assign its value (if any) to the set of default profiles. @@ -420,7 +418,7 @@ public abstract class AbstractEnvironment implements ConfigurableEnvironment { * active or default profiles. *
Subclasses may override to impose further restrictions on profile syntax.
* @throws IllegalArgumentException if the profile is null, empty, whitespace-only or
- * begins with the profile NOT operator (!).
+ * begins with the profile NOT operator (!)
* @see #acceptsProfiles
* @see #addActiveProfile
* @see #setDefaultProfiles
diff --git a/spring-core/src/main/java/org/springframework/core/env/ConfigurableEnvironment.java b/spring-core/src/main/java/org/springframework/core/env/ConfigurableEnvironment.java
index 9de866854fd..34ecf662340 100644
--- a/spring-core/src/main/java/org/springframework/core/env/ConfigurableEnvironment.java
+++ b/spring-core/src/main/java/org/springframework/core/env/ConfigurableEnvironment.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2022 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.
@@ -137,13 +137,13 @@ public interface ConfigurableEnvironment extends Environment, ConfigurableProper
Map For any identically-named {@code PropertySource} instance existing in both
* parent and child, the child instance is to be preserved and the parent instance
* discarded. This has the effect of allowing overriding of property sources by the
- * child as well as avoiding redundant searches through common property source types,
- * for example, system environment and system properties.
+ * child as well as avoiding redundant searches through common property source types
+ * — for example, system environment and system properties.
* Active and default profile names are also filtered for duplicates, to avoid
* confusion and redundant storage.
* The parent environment remains unmodified in any case. Note that any changes to
diff --git a/spring-core/src/main/java/org/springframework/core/env/ConfigurablePropertyResolver.java b/spring-core/src/main/java/org/springframework/core/env/ConfigurablePropertyResolver.java
index 01f47dae1f6..d440b78135b 100644
--- a/spring-core/src/main/java/org/springframework/core/env/ConfigurablePropertyResolver.java
+++ b/spring-core/src/main/java/org/springframework/core/env/ConfigurablePropertyResolver.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2024 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.
@@ -69,21 +69,23 @@ public interface ConfigurablePropertyResolver extends PropertyResolver {
void setPlaceholderSuffix(String placeholderSuffix);
/**
- * Specify the separating character between the placeholders replaced by this
- * resolver and their associated default value, or {@code null} if no such
+ * Set the separating character to be honored between placeholders replaced by
+ * this resolver and their associated default values, or {@code null} if no such
* special character should be processed as a value separator.
*/
void setValueSeparator(@Nullable String valueSeparator);
/**
- * Specify the escape character to use to ignore placeholder prefix or
- * value separator, or {@code null} if no escaping should take place.
+ * Set the escape character to use to ignore the
+ * {@linkplain #setPlaceholderPrefix(String) placeholder prefix} and the
+ * {@linkplain #setValueSeparator(String) value separator}, or {@code null}
+ * if no escaping should take place.
* @since 6.2
*/
void setEscapeCharacter(@Nullable Character escapeCharacter);
/**
- * Set whether to throw an exception when encountering an unresolvable placeholder
+ * Specify whether to throw an exception when encountering an unresolvable placeholder
* nested within the value of a given property. A {@code false} value indicates strict
* resolution, i.e. that an exception will be thrown. A {@code true} value indicates
* that unresolvable nested placeholders should be passed through in their unresolved
@@ -106,7 +108,7 @@ public interface ConfigurablePropertyResolver extends PropertyResolver {
* {@link #setRequiredProperties} is present and resolves to a
* non-{@code null} value.
* @throws MissingRequiredPropertiesException if any of the required
- * properties are not resolvable.
+ * properties are not resolvable
*/
void validateRequiredProperties() throws MissingRequiredPropertiesException;
diff --git a/spring-core/src/main/java/org/springframework/core/io/support/PropertiesLoaderSupport.java b/spring-core/src/main/java/org/springframework/core/io/support/PropertiesLoaderSupport.java
index 85d53d40475..12cf39559ca 100644
--- a/spring-core/src/main/java/org/springframework/core/io/support/PropertiesLoaderSupport.java
+++ b/spring-core/src/main/java/org/springframework/core/io/support/PropertiesLoaderSupport.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2024 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.
@@ -141,8 +141,8 @@ public abstract class PropertiesLoaderSupport {
/**
- * Return a merged Properties instance containing both the
- * loaded properties and properties set on this FactoryBean.
+ * Return a merged {@link Properties} instance containing both the
+ * loaded properties and properties set on this component.
*/
protected Properties mergeProperties() throws IOException {
Properties result = new Properties();