diff --git a/spring-test/src/main/java/org/springframework/test/context/MergedContextConfiguration.java b/spring-test/src/main/java/org/springframework/test/context/MergedContextConfiguration.java index 2eed29617c8b..d54188b076b3 100644 --- a/spring-test/src/main/java/org/springframework/test/context/MergedContextConfiguration.java +++ b/spring-test/src/main/java/org/springframework/test/context/MergedContextConfiguration.java @@ -190,8 +190,8 @@ public MergedContextConfiguration(MergedContextConfiguration mergedConfig) { * or {@code propertySourceProperties} an empty array will be stored instead. * If a {@code null} value is supplied for the * {@code contextInitializerClasses} an empty set will be stored instead. - * Furthermore, active profiles will be sorted, and duplicate profiles - * will be removed. + * Furthermore, duplicate active profiles will be removed while preserving + * registration order. * @param testClass the test class for which the configuration was merged * @param locations the merged context resource locations * @param classes the merged annotated classes @@ -229,8 +229,8 @@ public MergedContextConfiguration(Class testClass, String @Nullable [] locati * or {@code propertySourceProperties} an empty array will be stored instead. * If a {@code null} value is supplied for {@code contextInitializerClasses} * or {@code contextCustomizers}, an empty set will be stored instead. - * Furthermore, active profiles will be sorted, and duplicate profiles - * will be removed. + * Furthermore, duplicate active profiles will be removed while preserving + * registration order. * @param testClass the test class for which the configuration was merged * @param locations the merged context resource locations * @param classes the merged annotated classes @@ -268,8 +268,8 @@ public MergedContextConfiguration(Class testClass, String @Nullable [] locati * {@code activeProfiles}, or {@code propertySourceProperties} an empty array * will be stored instead. If a {@code null} value is supplied for * {@code contextInitializerClasses} or {@code contextCustomizers}, an empty - * set will be stored instead. Furthermore, active profiles will be sorted, - * and duplicate profiles will be removed. + * set will be stored instead. Furthermore, duplicate active profiles + * will be removed while preserving registration order. * @param testClass the test class for which the configuration was merged * @param locations the merged context resource locations * @param classes the merged annotated classes diff --git a/spring-test/src/main/java/org/springframework/test/context/web/WebMergedContextConfiguration.java b/spring-test/src/main/java/org/springframework/test/context/web/WebMergedContextConfiguration.java index cd8df132e89f..187acb782110 100644 --- a/spring-test/src/main/java/org/springframework/test/context/web/WebMergedContextConfiguration.java +++ b/spring-test/src/main/java/org/springframework/test/context/web/WebMergedContextConfiguration.java @@ -87,8 +87,8 @@ public WebMergedContextConfiguration(MergedContextConfiguration mergedConfig, St * If a {@code null} value is supplied for the * {@code contextInitializerClasses} an empty set will be stored instead. * If an empty value is supplied for the {@code resourceBasePath} - * an empty string will be used. Furthermore, active profiles will be sorted, - * and duplicate profiles will be removed. + * an empty string will be used. Furthermore, duplicate active profiles + * will be removed while preserving registration order. * @param testClass the test class for which the configuration was merged * @param locations the merged resource locations * @param classes the merged annotated classes @@ -125,8 +125,8 @@ public WebMergedContextConfiguration(Class testClass, String @Nullable [] loc * If a {@code null} value is supplied for {@code contextInitializerClasses} * or {@code contextCustomizers}, an empty set will be stored instead. * If an empty value is supplied for the {@code resourceBasePath} - * an empty string will be used. Furthermore, active profiles will be sorted, - * and duplicate profiles will be removed. + * an empty string will be used. Furthermore, duplicate active profiles + * will be removed while preserving registration order. * @param testClass the test class for which the configuration was merged * @param locations the merged context resource locations * @param classes the merged annotated classes @@ -164,8 +164,8 @@ public WebMergedContextConfiguration(Class testClass, String @Nullable [] loc * {@code activeProfiles}, or {@code propertySourceProperties} an empty array * will be stored instead. If a {@code null} value is supplied for * {@code contextInitializerClasses} or {@code contextCustomizers}, an empty - * set will be stored instead. Furthermore, active profiles will be sorted, - * and duplicate profiles will be removed. + * set will be stored instead. Furthermore, duplicate active profiles + * will be removed while preserving registration order. * @param testClass the test class for which the configuration was merged * @param locations the merged context resource locations * @param classes the merged annotated classes