Skip to content

Commit a520056

Browse files
committed
Make containsDescendantOf a default method
Change `ConfigurationPropertySource.containsDescendantOf` to have a default implementation that return `UNKNOWN`. Fixes gh-12539
1 parent 63b8ccc commit a520056

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/source/ConfigurationPropertySource.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2017 the original author or authors.
2+
* Copyright 2012-2018 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -50,7 +50,10 @@ public interface ConfigurationPropertySource {
5050
* @param name the name to check
5151
* @return if the source contains any descendants
5252
*/
53-
ConfigurationPropertyState containsDescendantOf(ConfigurationPropertyName name);
53+
default ConfigurationPropertyState containsDescendantOf(
54+
ConfigurationPropertyName name) {
55+
return ConfigurationPropertyState.UNKNOWN;
56+
}
5457

5558
/**
5659
* Return a filtered variant of this source, containing only names that match the

0 commit comments

Comments
 (0)