Skip to content

Commit 8807f94

Browse files
committed
Polish "Allow bypass of active/default properties"
See gh-26461
1 parent da3ff29 commit 8807f94

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

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

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2019 the original author or authors.
2+
* Copyright 2002-2021 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.
@@ -247,8 +247,8 @@ protected Set<String> doGetActiveProfiles() {
247247

248248
/**
249249
* Return the property value for the active profiles.
250-
* @see #ACTIVE_PROFILES_PROPERTY_NAME
251250
* @since 5.3.4
251+
* @see #ACTIVE_PROFILES_PROPERTY_NAME
252252
*/
253253
protected String doGetActiveProfilesProperty() {
254254
return getProperty(ACTIVE_PROFILES_PROPERTY_NAME);
@@ -313,8 +313,8 @@ protected Set<String> doGetDefaultProfiles() {
313313

314314
/**
315315
* Return the property value for the default profiles.
316-
* @see #DEFAULT_PROFILES_PROPERTY_NAME
317316
* @since 5.3.4
317+
* @see #DEFAULT_PROFILES_PROPERTY_NAME
318318
*/
319319
protected String doGetDefaultProfilesProperty() {
320320
return getProperty(DEFAULT_PROFILES_PROPERTY_NAME);

spring-core/src/test/java/org/springframework/core/env/CustomEnvironmentTests.java

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2019 the original author or authors.
2+
* Copyright 2002-2021 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.
@@ -110,7 +110,6 @@ protected Set<String> getReservedDefaultProfiles() {
110110
@Test
111111
public void withNoProfileProperties() {
112112
ConfigurableEnvironment env = new AbstractEnvironment() {
113-
114113
@Override
115114
protected String doGetActiveProfilesProperty() {
116115
return null;
@@ -120,7 +119,6 @@ protected String doGetActiveProfilesProperty() {
120119
protected String doGetDefaultProfilesProperty() {
121120
return null;
122121
}
123-
124122
};
125123
Map<String, Object> values = new LinkedHashMap<>();
126124
values.put(AbstractEnvironment.ACTIVE_PROFILES_PROPERTY_NAME, "a,b,c");

0 commit comments

Comments
 (0)