code: private static void copyIfNotPresent(Configuration config, String deprecatedKey, String newKey) {
      String deprecatedValue = config.get(deprecatedKey);
      if (config.get(newKey) == null && deprecatedValue != null) {
        logger.atWarning().log(
            "Key %s is deprecated. Copying the value of key %s to new key %s",
            deprecatedKey, deprecatedKey, newKey);
        config.set(newKey, deprecatedValue);
      }
    }
docs: Copy the value of the deprecated key to the new key if a value is present for the deprecated
  key, but not the new key.