From a5200568384b036202a49b53813aad4a6ce807b2 Mon Sep 17 00:00:00 2001 From: Phillip Webb Date: Mon, 19 Mar 2018 07:44:44 -0400 Subject: [PATCH] Make containsDescendantOf a default method Change `ConfigurationPropertySource.containsDescendantOf` to have a default implementation that return `UNKNOWN`. Fixes gh-12539 --- .../properties/source/ConfigurationPropertySource.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/source/ConfigurationPropertySource.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/source/ConfigurationPropertySource.java index 1a37036c4f..681897dfb7 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/source/ConfigurationPropertySource.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/source/ConfigurationPropertySource.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2017 the original author or authors. + * Copyright 2012-2018 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. @@ -50,7 +50,10 @@ public interface ConfigurationPropertySource { * @param name the name to check * @return if the source contains any descendants */ - ConfigurationPropertyState containsDescendantOf(ConfigurationPropertyName name); + default ConfigurationPropertyState containsDescendantOf( + ConfigurationPropertyName name) { + return ConfigurationPropertyState.UNKNOWN; + } /** * Return a filtered variant of this source, containing only names that match the