Hi all,
I’m developing a custom plugin which defines a project-level setting. When I make any change to the project level setting (a boolean on/off flag), the setting is not effective in the computation engine, for example in a Computer implementation in the custom plugin.
I tried it on both version 6.7.4 and 7.2.1 versions used
The only setting that is effective is a global-level property.
I tried it with both global+project and project-only, either way the project-level settings is not visible.
Via debugger I tracked it down to the DatabaseSettingsLoader::load() method, which is called via this stack
load:40, DatabaseSettingLoader (org.sonar.server.setting)
load:122, ThreadLocalSettings (org.sonar.server.setting)
get:114, ThreadLocalSettings (org.sonar.server.setting)
getRawString:95, Settings (org.sonar.api.config)
getString:145, Settings (org.sonar.api.config)
get:55, ConfigurationProvider$ServerConfigurationAdapter (org.sonar.server.config)
getBoolean:130, Configuration (org.sonar.api.config)
compute:76, MutationScoreComputer (ch.devcon5.sonar.plugins.mutationanalysis.metrics)
(..)
The load method always fetches the globalProperty
PropertyDto dto = dbClient.propertiesDao().selectGlobalProperty(key);
I’d expect a property that is set for project scope to be effective in the compute engine as well, not only global properties.
I’d appreciate if someone could either verify this issue or point me to where I’m wrong