Fix some sonar bugs in config-api and config-manager.