1
1
/*
2
- * Copyright 2002-2024 the original author or authors.
2
+ * Copyright 2002-2025 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
42
42
* add by default. {@code AbstractEnvironment} adds none. Subclasses should contribute
43
43
* property sources through the protected {@link #customizePropertySources(MutablePropertySources)}
44
44
* 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.
46
46
* See {@link ConfigurableEnvironment} javadoc for usage examples.
47
47
*
48
48
* @author Chris Beams
@@ -66,7 +66,7 @@ public abstract class AbstractEnvironment implements ConfigurableEnvironment {
66
66
public static final String IGNORE_GETENV_PROPERTY_NAME = "spring.getenv.ignore" ;
67
67
68
68
/**
69
- * Name of the property to set to specify active profiles: {@value}.
69
+ * Name of the property to specify active profiles: {@value}.
70
70
* <p>The value may be comma delimited.
71
71
* <p>Note that certain shell environments such as Bash disallow the use of the period
72
72
* character in variable names. Assuming that Spring's {@link SystemEnvironmentPropertySource}
@@ -77,7 +77,7 @@ public abstract class AbstractEnvironment implements ConfigurableEnvironment {
77
77
public static final String ACTIVE_PROFILES_PROPERTY_NAME = "spring.profiles.active" ;
78
78
79
79
/**
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}.
81
81
* <p>The value may be comma delimited.
82
82
* <p>Note that certain shell environments such as Bash disallow the use of the period
83
83
* character in variable names. Assuming that Spring's {@link SystemEnvironmentPropertySource}
@@ -141,7 +141,7 @@ protected AbstractEnvironment(MutablePropertySources propertySources) {
141
141
142
142
/**
143
143
* Factory method used to create the {@link ConfigurablePropertyResolver}
144
- * instance used by the Environment.
144
+ * used by this {@code Environment} .
145
145
* @since 5.3.4
146
146
* @see #getPropertyResolver()
147
147
*/
@@ -150,8 +150,7 @@ protected ConfigurablePropertyResolver createPropertyResolver(MutablePropertySou
150
150
}
151
151
152
152
/**
153
- * Return the {@link ConfigurablePropertyResolver} being used by the
154
- * {@link Environment}.
153
+ * Return the {@link ConfigurablePropertyResolver} used by the {@code Environment}.
155
154
* @since 5.3.4
156
155
* @see #createPropertyResolver(MutablePropertySources)
157
156
*/
@@ -319,15 +318,14 @@ public void addActiveProfile(String profile) {
319
318
}
320
319
}
321
320
322
-
323
321
@ Override
324
322
public String [] getDefaultProfiles () {
325
323
return StringUtils .toStringArray (doGetDefaultProfiles ());
326
324
}
327
325
328
326
/**
329
327
* 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
331
329
* consists only of {@linkplain #getReservedDefaultProfiles() reserved default
332
330
* profiles}, then check for the presence of {@link #doGetActiveProfilesProperty()}
333
331
* and assign its value (if any) to the set of default profiles.
@@ -418,7 +416,7 @@ protected boolean isProfileActive(String profile) {
418
416
* active or default profiles.
419
417
* <p>Subclasses may override to impose further restrictions on profile syntax.
420
418
* @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 (!)
422
420
* @see #acceptsProfiles
423
421
* @see #addActiveProfile
424
422
* @see #setDefaultProfiles
0 commit comments