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

Issues report contains invalid numbers depending on user locale

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.1
    • Fix Version/s: 5.1.2, 5.2
    • Component/s: None
    • Labels:
      None

      Description

      To output a number in a Freemarker template we should be careful to not depends on user locale. See:
      http://freemarker.org/docs/ref_builtins_number.html#ref_builtin_c

      var nbResources = ${report.getResourcesWithReport()?size};
      

      is wrong since it can result to:

      var nbResources = 1,099;
      

      when comma is the grouping separator.

      Original report of the problem:
      https://groups.google.com/d/msg/sonarqube/0PpUztFw2W4/urGTMKZogl4J

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              julien.henry Julien Henry
              Reporter:
              julien.henry Julien Henry
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Due:
                Created:
                Updated:
                Resolved: