Skip to content

Commit dfc8406

Browse files
authored
Polish contribution
See gh-26462 Closes gh-26586
1 parent 313e754 commit dfc8406

File tree

3 files changed

+18
-2
lines changed

3 files changed

+18
-2
lines changed

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,17 @@ public class StandardEnvironment extends AbstractEnvironment {
6060
public static final String SYSTEM_PROPERTIES_PROPERTY_SOURCE_NAME = "systemProperties";
6161

6262

63+
/**
64+
* Create a new {@code StandardEnvironment} instance.
65+
*/
6366
public StandardEnvironment() {
6467
}
6568

69+
/**
70+
* Create a new {@code StandardEnvironment} instance with a specific {@link MutablePropertySources} instance.
71+
* @param propertySources property sources to use
72+
* @since 5.3.4
73+
*/
6674
protected StandardEnvironment(MutablePropertySources propertySources) {
6775
super(propertySources);
6876
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ protected Set<String> getReservedDefaultProfiles() {
108108
}
109109

110110
@Test
111-
public void withNoProfileProperties() {
111+
void withNoProfileProperties() {
112112
ConfigurableEnvironment env = new AbstractEnvironment() {
113113
@Override
114114
@Nullable
@@ -131,7 +131,7 @@ protected String doGetDefaultProfilesProperty() {
131131
}
132132

133133
@Test
134-
public void withCustomMutablePropertySources() {
134+
void withCustomMutablePropertySources() {
135135
class CustomMutablePropertySources extends MutablePropertySources {}
136136
MutablePropertySources propertySources = new CustomMutablePropertySources();
137137
ConfigurableEnvironment env = new AbstractEnvironment(propertySources) {};

spring-web/src/main/java/org/springframework/web/context/support/StandardServletEnvironment.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,17 @@ public class StandardServletEnvironment extends StandardEnvironment implements C
5454
public static final String JNDI_PROPERTY_SOURCE_NAME = "jndiProperties";
5555

5656

57+
/**
58+
* Create a new {@code StandardServletEnvironment} instance.
59+
*/
5760
public StandardServletEnvironment() {
5861
}
5962

63+
/**
64+
* Create a new {@code StandardServletEnvironment} instance with a specific {@link MutablePropertySources} instance.
65+
* @param propertySources property sources to use
66+
* @since 5.3.4
67+
*/
6068
protected StandardServletEnvironment(MutablePropertySources propertySources) {
6169
super(propertySources);
6270
}

0 commit comments

Comments
 (0)