Uploaded image for project: 'SonarJava'
  1. SonarJava
  2. SONARJAVA-2719

VisitorsBridgeForTests.TestJavaFileScannerContext class does not handle correctly secondaries in all casses

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.3
    • Component/s: Plugin, Rules
    • Labels:
      None

      Description

      Currently, there is an issue when the method

      reportIssue(JavaCheck javaCheck, Tree startTree, Tree endTree, String message, List<Location> secondary, @Nullable Integer cost)

      from VisitorsBridgeForTests.TestJavaFileScannerContext class is executed and the "secondary" parameter is not an empty List.

      Consequently, instead of creating secondaries (a list of list of a single elements), we are then creating a singleton list containing a single list with all the elements, which is then considered as being a flow. This make tests of secondaries impossible in this context.

      The "secondaries" parameter should be a changed before provided to the next layer, and translated into a List that contains a SingletonList for each Location object.

        Attachments

          Activity

            People

            • Assignee:
              stylianos.agapiou Stylianos Agapiou (Inactive)
              Reporter:
              stylianos.agapiou Stylianos Agapiou (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Due:
                Created:
                Updated:
                Resolved: