From b2f4011fbc974cbd3a65583784afe4da5ab3fa82 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Mon, 15 Feb 2021 16:24:10 +0100 Subject: [PATCH] Polish "Allow bypass of active/default properties" See gh-26461 --- .../org/springframework/core/env/AbstractEnvironment.java | 6 +++--- .../springframework/core/env/CustomEnvironmentTests.java | 4 +--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/spring-core/src/main/java/org/springframework/core/env/AbstractEnvironment.java b/spring-core/src/main/java/org/springframework/core/env/AbstractEnvironment.java index 8568f194d77f..6a75edcb1c41 100644 --- a/spring-core/src/main/java/org/springframework/core/env/AbstractEnvironment.java +++ b/spring-core/src/main/java/org/springframework/core/env/AbstractEnvironment.java @@ -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. @@ -247,8 +247,8 @@ protected Set 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); @@ -313,8 +313,8 @@ protected Set 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); diff --git a/spring-core/src/test/java/org/springframework/core/env/CustomEnvironmentTests.java b/spring-core/src/test/java/org/springframework/core/env/CustomEnvironmentTests.java index 4cb4a87bc791..dd7bac24ee09 100644 --- a/spring-core/src/test/java/org/springframework/core/env/CustomEnvironmentTests.java +++ b/spring-core/src/test/java/org/springframework/core/env/CustomEnvironmentTests.java @@ -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. @@ -110,7 +110,6 @@ protected Set getReservedDefaultProfiles() { @Test public void withNoProfileProperties() { ConfigurableEnvironment env = new AbstractEnvironment() { - @Override protected String doGetActiveProfilesProperty() { return null; @@ -120,7 +119,6 @@ protected String doGetActiveProfilesProperty() { protected String doGetDefaultProfilesProperty() { return null; } - }; Map values = new LinkedHashMap<>(); values.put(AbstractEnvironment.ACTIVE_PROFILES_PROPERTY_NAME, "a,b,c");