Skip to content

Commit 22abcf9

Browse files
committed
Update examples to use Environment#matchesProfiles()
1 parent 4fa2719 commit 22abcf9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

framework-docs/modules/ROOT/pages/core/beans/java/composing-configuration-classes.adoc

+2-2
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,7 @@ Java::
541541
MultiValueMap<String, Object> attrs = metadata.getAllAnnotationAttributes(Profile.class.getName());
542542
if (attrs != null) {
543543
for (Object value : attrs.get("value")) {
544-
if (context.getEnvironment().acceptsProfiles(((String[]) value))) {
544+
if (context.getEnvironment().matchesProfiles((String[]) value)) {
545545
return true;
546546
}
547547
}
@@ -560,7 +560,7 @@ Kotlin::
560560
val attrs = metadata.getAllAnnotationAttributes(Profile::class.java.name)
561561
if (attrs != null) {
562562
for (value in attrs["value"]!!) {
563-
if (context.environment.acceptsProfiles(Profiles.of(*value as Array<String>))) {
563+
if (context.environment.matchesProfiles(*value as Array<String>)) {
564564
return true
565565
}
566566
}

0 commit comments

Comments
 (0)