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

Support arrays returned by methods annotated with @DependsUpon or @DependedUpon

    XMLWordPrintable

    Details

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

      Description

      The following code was ignored :

      @DependsUpon
      public Metric[] dependsOnMetrics() {
        return new Metric[]{CoreMetrics.NCLOC, CoreMetrics.COMPLEXITY};
      }
      

      The workaround was to use collections :

      @DependsUpon
      public List<Metric> dependsOnMetrics() {
        return Arrays.asList(CoreMetrics.NCLOC, CoreMetrics.COMPLEXITY);
      }
      

      Arrays should now be fully supported.

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved: