From 22abcf9aefd2effef488e1cbe269a9e0639c505a Mon Sep 17 00:00:00 2001 From: Sam Brannen <104798+sbrannen@users.noreply.github.com> Date: Thu, 29 Aug 2024 16:25:04 +0200 Subject: [PATCH] Update examples to use Environment#matchesProfiles() --- .../core/beans/java/composing-configuration-classes.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/framework-docs/modules/ROOT/pages/core/beans/java/composing-configuration-classes.adoc b/framework-docs/modules/ROOT/pages/core/beans/java/composing-configuration-classes.adoc index b45ac0de66..a30f5c26e2 100644 --- a/framework-docs/modules/ROOT/pages/core/beans/java/composing-configuration-classes.adoc +++ b/framework-docs/modules/ROOT/pages/core/beans/java/composing-configuration-classes.adoc @@ -541,7 +541,7 @@ Java:: MultiValueMap attrs = metadata.getAllAnnotationAttributes(Profile.class.getName()); if (attrs != null) { for (Object value : attrs.get("value")) { - if (context.getEnvironment().acceptsProfiles(((String[]) value))) { + if (context.getEnvironment().matchesProfiles((String[]) value)) { return true; } } @@ -560,7 +560,7 @@ Kotlin:: val attrs = metadata.getAllAnnotationAttributes(Profile::class.java.name) if (attrs != null) { for (value in attrs["value"]!!) { - if (context.environment.acceptsProfiles(Profiles.of(*value as Array))) { + if (context.environment.matchesProfiles(*value as Array)) { return true } }