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

Error when sorting some float measures

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.2
    • Component/s: Measures
    • Labels:
      None

      Description

      To reproduce the issue, search for "projects+files" ordered by ascending technical debt. It raises on H2 (not tested on other databases):

      2013.06.03 08:27:27 ERROR o.s.MEASURE_FILTER  Fail to execute measure
      filter:
      MeasureFilterContext[filter={pageSize=30|display=list|cols=metric:alert_statusnameversionmetric:nclocmetric:violations_densitymetric:duplicated_lines_densitymetric:coveragemetric:comment_lines_densitymetric:issuesdatemetric:blocker_violations|sort=metric:coverage|asc=true|qualifiers=TRK|page=1|id=1},sql=SELECT
      s.id, s.project_id, s.root_project_id, pmsort.value FROM snapshots s INNER
      JOIN projects p ON s.project_id=p.id  LEFT OUTER JOIN project_measures
      pmsort ON s.id=pmsort.snapshot_id AND pmsort.metric_id=37 AND pmsort.rule_id
      IS NULL AND pmsort.rule_priority IS NULL AND pmsort.characteristic_id IS
      NULL AND pmsort.person_id IS NULL  WHERE  s.status='P' AND s.islast=true AND
      p.copy_resource_id IS NULL  AND s.qualifier IN  ('TRK') ,user=1]
      java.lang.IllegalArgumentException: Comparison method violates its general
      contract!
              at java.util.TimSort.mergeLo(TimSort.java:747) ~[na:1.7.0_19]
              at java.util.TimSort.mergeAt(TimSort.java:483) ~[na:1.7.0_19]
              at java.util.TimSort.mergeCollapse(TimSort.java:410) ~[na:1.7.0_19]
              at java.util.TimSort.sort(TimSort.java:214) ~[na:1.7.0_19]
              at java.util.TimSort.sort(TimSort.java:173) ~[na:1.7.0_19]
              at java.util.Arrays.sort(Arrays.java:659) ~[na:1.7.0_19]
              at java.util.Collections.sort(Collections.java:217) ~[na:1.7.0_19]
      

        Attachments

          Activity

            People

            Assignee:
            simon.brandhof Simon Brandhof (Inactive)
            Reporter:
            simon.brandhof Simon Brandhof (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Due:
              Created:
              Updated:
              Resolved: