Skip to content

Commit

Permalink
Polish "Allow bypass of active/default properties"
Browse files Browse the repository at this point in the history
  • Loading branch information
snicoll authored and lxbzmy committed Mar 26, 2022
1 parent 6ce7542 commit b2f4011
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 the original author or authors.
* Copyright 2002-2021 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -247,8 +247,8 @@ protected Set<String> doGetActiveProfiles() {

/**
* Return the property value for the active profiles.
* @see #ACTIVE_PROFILES_PROPERTY_NAME
* @since 5.3.4
* @see #ACTIVE_PROFILES_PROPERTY_NAME
*/
protected String doGetActiveProfilesProperty() {
return getProperty(ACTIVE_PROFILES_PROPERTY_NAME);
Expand Down Expand Up @@ -313,8 +313,8 @@ protected Set<String> doGetDefaultProfiles() {

/**
* Return the property value for the default profiles.
* @see #DEFAULT_PROFILES_PROPERTY_NAME
* @since 5.3.4
* @see #DEFAULT_PROFILES_PROPERTY_NAME
*/
protected String doGetDefaultProfilesProperty() {
return getProperty(DEFAULT_PROFILES_PROPERTY_NAME);
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 the original author or authors.
* Copyright 2002-2021 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -110,7 +110,6 @@ protected Set<String> getReservedDefaultProfiles() {
@Test
public void withNoProfileProperties() {
ConfigurableEnvironment env = new AbstractEnvironment() {

@Override
protected String doGetActiveProfilesProperty() {
return null;
Expand All @@ -120,7 +119,6 @@ protected String doGetActiveProfilesProperty() {
protected String doGetDefaultProfilesProperty() {
return null;
}

};
Map<String, Object> values = new LinkedHashMap<>();
values.put(AbstractEnvironment.ACTIVE_PROFILES_PROPERTY_NAME, "a,b,c");
Expand Down

0 comments on commit b2f4011

Please sign in to comment.