private final String load(String key, String defaultValue, String comment) {
    	if(options.containsKey(key)) {
    		return options.get(key);
    	} else if (config.getProperty(key) != null) {
            return config.getString(key);
        } else {
            if (defaultValue != null) {
                try {
                    config.addProperty(key, defaultValue);
                    if (comment != null) {
                        propertiesConfigurationLayout.setComment(key, comment);
                    } else {
                        propertiesConfigurationLayout
                                .setComment(
                                        key,
                                        "Automatically added default value. Please see Client Properties documentation on ExtWebDriver homepage.");
                    }
                    config.save(config.getPath());
                } catch (ConfigurationException e) {
                    logger.error("Error saving updated property file ('" + config.getPath() + "')"
                            + e);
                }
            }
            return defaultValue;
        }
    }
private final String load ( String key , String defaultValue , String comment ) { if ( options . containsKey ( key ) ) { return options . get ( key ) ; } else if ( config . getProperty ( key ) != null ) { return config . getString ( key ) ; } else { if ( defaultValue != null ) { try { config . addProperty ( key , defaultValue ) ; if ( comment != null ) { propertiesConfigurationLayout . setComment ( key , comment ) ; } else { propertiesConfigurationLayout . setComment ( key , "Automatically added default value. Please see Client Properties documentation on ExtWebDriver homepage." ) ; } config . save ( config . getPath ( ) ) ; } catch ( ConfigurationException e ) { logger . error ( "Error saving updated property file ('" + config . getPath ( ) + "')" + e ) ; } } return defaultValue ; } }
Loads the given key/value pair into the configuration.
<p>
If the configuration already contains the given key, no change is made to
the configuration.

@param key
the key to be put into the configuration
@param defaultValue
the value to be put into the configuration; if {@code null},
then no change is made to the configuration
@param comment
a comment to be set for the key/value pair; {@code null}
values permitted
@return the newly set value, or the current value if the configuration
already contains the given key