Uploaded image for project: 'SonarQube'
  1. SonarQube
  2. SONAR-8216

System info page fails when a setting is defined both in sonar.properties and in DB

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 6.1
    • Fix Version/s: 6.7.1, 7.0
    • Component/s: Settings, Web API
    • Labels:

      Description

      Issue

      When a setting is defined in sonar.properties and in DB, the system info page is displaying a blank page because the WS api/system/info is returning a 400 error :

      {"errors":[{"msg":"Multiple entries with same key: sonar.test=2 and sonar.test=1"}]}
      

      The expected behavior is that sonar.properties takes precedence of settings stored in database.

      Technical details

      This issue is coming from ThreadLocalSettings#getProperties() that is using an ImmutableMap to merge settings from DB and from sonar.properties => it's not allowed to have duplication in an ImmutableMap

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                simon.brandhof Simon Brandhof
                Reporter:
                julien.lancelot Julien Lancelot
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Due:
                  Created:
                  Updated:
                  Resolved: