Skip to content

Commit dbaba3d

Browse files
committed
Merge branch '6.2.x'
2 parents 97d5f7f + 45a2c51 commit dbaba3d

File tree

4 files changed

+24
-24
lines changed

4 files changed

+24
-24
lines changed

spring-core/src/main/java/org/springframework/core/env/AbstractEnvironment.java

+8-10
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2024 the original author or authors.
2+
* Copyright 2002-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -42,7 +42,7 @@
4242
* add by default. {@code AbstractEnvironment} adds none. Subclasses should contribute
4343
* property sources through the protected {@link #customizePropertySources(MutablePropertySources)}
4444
* hook, while clients should customize using {@link ConfigurableEnvironment#getPropertySources()}
45-
* and working against the {@link MutablePropertySources} API.
45+
* and work against the {@link MutablePropertySources} API.
4646
* See {@link ConfigurableEnvironment} javadoc for usage examples.
4747
*
4848
* @author Chris Beams
@@ -66,7 +66,7 @@ public abstract class AbstractEnvironment implements ConfigurableEnvironment {
6666
public static final String IGNORE_GETENV_PROPERTY_NAME = "spring.getenv.ignore";
6767

6868
/**
69-
* Name of the property to set to specify active profiles: {@value}.
69+
* Name of the property to specify active profiles: {@value}.
7070
* <p>The value may be comma delimited.
7171
* <p>Note that certain shell environments such as Bash disallow the use of the period
7272
* character in variable names. Assuming that Spring's {@link SystemEnvironmentPropertySource}
@@ -77,7 +77,7 @@ public abstract class AbstractEnvironment implements ConfigurableEnvironment {
7777
public static final String ACTIVE_PROFILES_PROPERTY_NAME = "spring.profiles.active";
7878

7979
/**
80-
* Name of the property to set to specify profiles that are active by default: {@value}.
80+
* Name of the property to specify profiles that are active by default: {@value}.
8181
* <p>The value may be comma delimited.
8282
* <p>Note that certain shell environments such as Bash disallow the use of the period
8383
* character in variable names. Assuming that Spring's {@link SystemEnvironmentPropertySource}
@@ -141,7 +141,7 @@ protected AbstractEnvironment(MutablePropertySources propertySources) {
141141

142142
/**
143143
* Factory method used to create the {@link ConfigurablePropertyResolver}
144-
* instance used by the Environment.
144+
* used by this {@code Environment}.
145145
* @since 5.3.4
146146
* @see #getPropertyResolver()
147147
*/
@@ -150,8 +150,7 @@ protected ConfigurablePropertyResolver createPropertyResolver(MutablePropertySou
150150
}
151151

152152
/**
153-
* Return the {@link ConfigurablePropertyResolver} being used by the
154-
* {@link Environment}.
153+
* Return the {@link ConfigurablePropertyResolver} used by the {@code Environment}.
155154
* @since 5.3.4
156155
* @see #createPropertyResolver(MutablePropertySources)
157156
*/
@@ -319,15 +318,14 @@ public void addActiveProfile(String profile) {
319318
}
320319
}
321320

322-
323321
@Override
324322
public String[] getDefaultProfiles() {
325323
return StringUtils.toStringArray(doGetDefaultProfiles());
326324
}
327325

328326
/**
329327
* Return the set of default profiles explicitly set via
330-
* {@link #setDefaultProfiles(String...)} or if the current set of default profiles
328+
* {@link #setDefaultProfiles(String...)}, or if the current set of default profiles
331329
* consists only of {@linkplain #getReservedDefaultProfiles() reserved default
332330
* profiles}, then check for the presence of {@link #doGetActiveProfilesProperty()}
333331
* and assign its value (if any) to the set of default profiles.
@@ -418,7 +416,7 @@ protected boolean isProfileActive(String profile) {
418416
* active or default profiles.
419417
* <p>Subclasses may override to impose further restrictions on profile syntax.
420418
* @throws IllegalArgumentException if the profile is null, empty, whitespace-only or
421-
* begins with the profile NOT operator (!).
419+
* begins with the profile NOT operator (!)
422420
* @see #acceptsProfiles
423421
* @see #addActiveProfile
424422
* @see #setDefaultProfiles

spring-core/src/main/java/org/springframework/core/env/ConfigurableEnvironment.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2022 the original author or authors.
2+
* Copyright 2002-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -137,13 +137,13 @@ public interface ConfigurableEnvironment extends Environment, ConfigurableProper
137137
Map<String, Object> getSystemEnvironment();
138138

139139
/**
140-
* Append the given parent environment's active profiles, default profiles and
140+
* Append the given parent environment's active profiles, default profiles, and
141141
* property sources to this (child) environment's respective collections of each.
142142
* <p>For any identically-named {@code PropertySource} instance existing in both
143143
* parent and child, the child instance is to be preserved and the parent instance
144144
* discarded. This has the effect of allowing overriding of property sources by the
145-
* child as well as avoiding redundant searches through common property source types,
146-
* for example, system environment and system properties.
145+
* child as well as avoiding redundant searches through common property source types
146+
* &mdash; for example, system environment and system properties.
147147
* <p>Active and default profile names are also filtered for duplicates, to avoid
148148
* confusion and redundant storage.
149149
* <p>The parent environment remains unmodified in any case. Note that any changes to

spring-core/src/main/java/org/springframework/core/env/ConfigurablePropertyResolver.java

+9-7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2024 the original author or authors.
2+
* Copyright 2002-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -70,21 +70,23 @@ public interface ConfigurablePropertyResolver extends PropertyResolver {
7070
void setPlaceholderSuffix(String placeholderSuffix);
7171

7272
/**
73-
* Specify the separating character between the placeholders replaced by this
74-
* resolver and their associated default value, or {@code null} if no such
73+
* Set the separating character to be honored between placeholders replaced by
74+
* this resolver and their associated default values, or {@code null} if no such
7575
* special character should be processed as a value separator.
7676
*/
7777
void setValueSeparator(@Nullable String valueSeparator);
7878

7979
/**
80-
* Specify the escape character to use to ignore placeholder prefix or
81-
* value separator, or {@code null} if no escaping should take place.
80+
* Set the escape character to use to ignore the
81+
* {@linkplain #setPlaceholderPrefix(String) placeholder prefix} and the
82+
* {@linkplain #setValueSeparator(String) value separator}, or {@code null}
83+
* if no escaping should take place.
8284
* @since 6.2
8385
*/
8486
void setEscapeCharacter(@Nullable Character escapeCharacter);
8587

8688
/**
87-
* Set whether to throw an exception when encountering an unresolvable placeholder
89+
* Specify whether to throw an exception when encountering an unresolvable placeholder
8890
* nested within the value of a given property. A {@code false} value indicates strict
8991
* resolution, i.e. that an exception will be thrown. A {@code true} value indicates
9092
* that unresolvable nested placeholders should be passed through in their unresolved
@@ -107,7 +109,7 @@ public interface ConfigurablePropertyResolver extends PropertyResolver {
107109
* {@link #setRequiredProperties} is present and resolves to a
108110
* non-{@code null} value.
109111
* @throws MissingRequiredPropertiesException if any of the required
110-
* properties are not resolvable.
112+
* properties are not resolvable
111113
*/
112114
void validateRequiredProperties() throws MissingRequiredPropertiesException;
113115

spring-core/src/main/java/org/springframework/core/io/support/PropertiesLoaderSupport.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2024 the original author or authors.
2+
* Copyright 2002-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -138,8 +138,8 @@ public void setPropertiesPersister(@Nullable PropertiesPersister propertiesPersi
138138

139139

140140
/**
141-
* Return a merged Properties instance containing both the
142-
* loaded properties and properties set on this FactoryBean.
141+
* Return a merged {@link Properties} instance containing both the
142+
* loaded properties and properties set on this component.
143143
*/
144144
protected Properties mergeProperties() throws IOException {
145145
Properties result = new Properties();

0 commit comments

Comments
 (0)