private void processKeyValue ( Map < ConfigurationKey , Object > properties , ConfigurationKey key , Object value ) { if ( value instanceof String ) { value = key . convertValue ( ( String ) value ) ; } if ( key . isValidValue ( value ) ) { Object previous = properties . put ( key , value ) ; if ( previous != null && ! previous . equals ( value ) ) { throw ConfigurationLogger . LOG . configurationKeyHasDifferentValues ( key . get ( ) , previous , value ) ; } } else { throw ConfigurationLogger . LOG . invalidConfigurationPropertyValue ( value , key . get ( ) ) ; } }
Process the given key and value . First validate the value and check if there s no different value for the same key in the same source - invalid and different values are treated as a deployment problem .