- java.lang.Object
-
- io.helidon.config.DeprecatedConfig
-
public final class DeprecatedConfig extends Object
A utility class to handle configuration properties that should no longer be used.For one major release, the property is retrieved through this class, to warn about the usage. In next major release, the deprecated property is removed (as is use of this class).
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Config
get(Config config, String currentKey, String deprecatedKey)
Get a value from config, attempting to read both the keys.
-
-
-
Method Detail
-
get
public static Config get(Config config, String currentKey, String deprecatedKey)
Get a value from config, attempting to read both the keys. Warning is logged if either the current key is not defined, or both the keys are defined.- Parameters:
config
- configuration instancecurrentKey
- key that should be useddeprecatedKey
- key that should not be used- Returns:
- config node of the current key if exists, of the deprecated key if it does not, missing node otherwise
-
-