Polish contribution

See gh-26462
Closes gh-26586
This commit is contained in:
Johnny Lim
2021-02-22 19:05:25 +09:00
committed by GitHub
parent 313e754a84
commit dfc8406917
3 changed files with 18 additions and 2 deletions

View File

@@ -60,9 +60,17 @@ public class StandardEnvironment extends AbstractEnvironment {
public static final String SYSTEM_PROPERTIES_PROPERTY_SOURCE_NAME = "systemProperties";
/**
* Create a new {@code StandardEnvironment} instance.
*/
public StandardEnvironment() {
}
/**
* Create a new {@code StandardEnvironment} instance with a specific {@link MutablePropertySources} instance.
* @param propertySources property sources to use
* @since 5.3.4
*/
protected StandardEnvironment(MutablePropertySources propertySources) {
super(propertySources);
}

View File

@@ -108,7 +108,7 @@ class CustomEnvironmentTests {
}
@Test
public void withNoProfileProperties() {
void withNoProfileProperties() {
ConfigurableEnvironment env = new AbstractEnvironment() {
@Override
@Nullable
@@ -131,7 +131,7 @@ class CustomEnvironmentTests {
}
@Test
public void withCustomMutablePropertySources() {
void withCustomMutablePropertySources() {
class CustomMutablePropertySources extends MutablePropertySources {}
MutablePropertySources propertySources = new CustomMutablePropertySources();
ConfigurableEnvironment env = new AbstractEnvironment(propertySources) {};

View File

@@ -54,9 +54,17 @@ public class StandardServletEnvironment extends StandardEnvironment implements C
public static final String JNDI_PROPERTY_SOURCE_NAME = "jndiProperties";
/**
* Create a new {@code StandardServletEnvironment} instance.
*/
public StandardServletEnvironment() {
}
/**
* Create a new {@code StandardServletEnvironment} instance with a specific {@link MutablePropertySources} instance.
* @param propertySources property sources to use
* @since 5.3.4
*/
protected StandardServletEnvironment(MutablePropertySources propertySources) {
super(propertySources);
}