How to get configuration parameters of sub-module in project level sensor?

Our version of sonarqube server is 9.9
I am developing a project level sensor, and I test it in the C# project

public class MySensor implements ProjectSensor {
    @Override
    public void execute(SensorContext sensorContext) {
        Configuration configuration = sensorContext.config();
        String[] modules = configuration.getStringArray("sonar.modules");
        if (modules != null) {
            for(String module : modules) {
                LOGGER.info("G11n Scanner is running for module: {}", module); // output 105E62AE-B49D-414B-9793-BF53580E879B
                String baseDir = configuration.get(module + "." + "sonar.projectBaseDir").orElse("");
                if (!baseDir.isEmpty()) {
                    LOGGER.info(module + "." + "sonar.projectBaseDir" + ": {}", baseDir); // no output
                }
                String sources = configuration.get(module + "." + "sonar.sources").orElse("");
                if (!sources.isEmpty()) {
                    LOGGER.info(module + "." + "sonar.sources" + ": {}", sources); // no output
                }
            }
        }
    }
}

The following is content of .sonarqube\out\sonar-project.properties :

sonar.projectKey=test-test
sonar.working.directory=D:\\SourceCode\\flutter\\WindowsFormsApp1\\.sonarqube\\out\\.sonar
sonar.projectBaseDir=D:\\SourceCode\\flutter\\WindowsFormsApp1\\WindowsFormsApp1

105E62AE-B49D-414B-9793-BF53580E879B.sonar.projectKey=test-test:105E62AE-B49D-414B-9793-BF53580E879B
105E62AE-B49D-414B-9793-BF53580E879B.sonar.projectName=WindowsFormsApp1
105E62AE-B49D-414B-9793-BF53580E879B.sonar.projectBaseDir=D:\\SourceCode\\flutter\\WindowsFormsApp1\\WindowsFormsApp1
105E62AE-B49D-414B-9793-BF53580E879B.sonar.sourceEncoding=utf-8
105E62AE-B49D-414B-9793-BF53580E879B.sonar.sources=\
"D:\\SourceCode\\flutter\\WindowsFormsApp1\\WindowsFormsApp1\\Form1.cs",\
"D:\\SourceCode\\flutter\\WindowsFormsApp1\\WindowsFormsApp1\\Form1.Designer.cs",\
"D:\\SourceCode\\flutter\\WindowsFormsApp1\\WindowsFormsApp1\\Program.cs",\
"D:\\SourceCode\\flutter\\WindowsFormsApp1\\WindowsFormsApp1\\Properties\\AssemblyInfo.cs",\
"D:\\SourceCode\\flutter\\WindowsFormsApp1\\WindowsFormsApp1\\Form1.resx",\
"D:\\SourceCode\\flutter\\WindowsFormsApp1\\WindowsFormsApp1\\Properties\\Resources.resx",\
"D:\\SourceCode\\flutter\\WindowsFormsApp1\\WindowsFormsApp1\\Form1.zh-Hans.resx",\
"D:\\SourceCode\\flutter\\WindowsFormsApp1\\WindowsFormsApp1\\Properties\\Settings.settings",\
"D:\\SourceCode\\flutter\\WindowsFormsApp1\\WindowsFormsApp1\\App.config"

105E62AE-B49D-414B-9793-BF53580E879B.sonar.cs.analyzer.projectOutPaths=\
"D:\\SourceCode\\flutter\\WindowsFormsApp1\\.sonarqube\\out\\0"
105E62AE-B49D-414B-9793-BF53580E879B.sonar.cs.roslyn.reportFilePaths=\
"D:\\SourceCode\\flutter\\WindowsFormsApp1\\.sonarqube\\out\\0\\Issues.json"

105E62AE-B49D-414B-9793-BF53580E879B.sonar.working.directory=D:\\SourceCode\\flutter\\WindowsFormsApp1\\.sonarqube\\out\\.sonar\\mod0
sonar.host.url=http://127.0.0.1:9000
sonar.visualstudio.enable=false

sonar.modules=105E62AE-B49D-414B-9793-BF53580E879B


It seem be bug of sonarqube?
After I change Configuration to Settings:

Settings settings = sensorContext.settings();
LOGGER.info("module.sonar.projectBaseDir: {}", settings.getString(module + "." + "sonar.projectBaseDir"));

I can get

INFO: module.sonar.projectBaseDir: D:\SourceCode\flutter\WindowsFormsApp1\WindowsFormsApp1

But Settings is deprecated, it isn’t recommended.

Hi,

Sorry, but I don’t understand what you’re asking. Could you detail what you’re trying to accomplish?

 
Ann

I had asked colleague to create ticket to SonarQube support: The sonarqube SDK states that Configuration has replaced the functionality of Settings , and Settings is now deprecated. But am unable to retrieve parameters for sub-modules via Configuration, so I think this is bug of Configuration.