private void validateParameterProviders ( ) { Set < String > parameterNames = new HashSet <> ( ) ; for ( ParameterProvider provider : this . parameterProviders ) { Set < String > applicationIdsOfThisProvider = new HashSet <> ( ) ; for ( Parameter < ? > parameter : provider . getParameters ( ) ) { if ( StringUtils . isNotEmpty ( parameter . getApplicationId ( ) ) ) { applicationIdsOfThisProvider . add ( parameter . getApplicationId ( ) ) ; } if ( parameterNames . contains ( parameter . getName ( ) ) ) { log . warn ( "Parameter name is not unique: {} (application: {})" , parameter . getName ( ) , parameter . getApplicationId ( ) ) ; } else { parameterNames . add ( parameter . getName ( ) ) ; } } if ( applicationIdsOfThisProvider . size ( ) > 1 ) { //NOPMD log . warn ( "Parameter provider {} defines parameters with multiple application Ids: {}" , provider , applicationIdsOfThisProvider . toArray ( new String [ applicationIdsOfThisProvider . size ( ) ] ) ) ; } } }
Validate that application ids and configuration names are unique over all providers .