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

Drop usage of deprecated internal method "hasSemantic()" in our rules

    Details

    • Type: Task
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 6.15
    • Component/s: Rules
    • Labels:
      None

      Description

      Since migration to ECJ frontend, method `org.sonar.java.ast.visitors.SubscriptionVisitor.hasSemantic()` does not make sense anymore.

      In production, facing situations where this would method return false was impossible, and thus it led to the introduction of tons of useless tests in our rules code.

      As of today, we simply always have access to the semantic, or an approximation of it built by the ECJ engine. The methods and their usages should be dropped in our rules, and tests relying on it as well.

        Attachments

          Activity

            People

            • Assignee:
              michael.gumowski Michael Gumowski
              Reporter:
              michael.gumowski Michael Gumowski
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Due:
                Created:
                Updated:
                Resolved: