Class 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 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 instance
        currentKey - key that should be used
        deprecatedKey - 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