public static void substituteDeprecatedConfigKey ( Configuration config , String deprecated , String designated ) { // set the designated key only if it is not set already if ( ! config . containsKey ( designated ) ) { final String valueForDeprecated = config . getString ( deprecated , null ) ; if ( valueForDeprecated != null ) { config . setString ( designated , valueForDeprecated ) ; } } }
Sets the value of a new config key to the value of a deprecated config key .