Make containsDescendantOf a default method

Change `ConfigurationPropertySource.containsDescendantOf` to have a
default implementation that return `UNKNOWN`.

Fixes gh-12539
pull/12528/merge
Phillip Webb 7 years ago
parent 63b8ccc7c3
commit a520056838

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with 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 * @param name the name to check
* @return if the source contains any descendants * @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 * Return a filtered variant of this source, containing only names that match the

Loading…
Cancel
Save