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

New rule: Unused parameter in lambda when calling certain methods

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      Compile a list of methods where an unused parameter in the lambda passed as an argument could lead to issues and then specify a rule based on that.

      This is a generalization of the reported post:

      Noncompliant Code

      Executors.newCachedThreadPool(r -> new Thread(name));

      Compilant Code

      Executors.newCachedThreadPool(r -> new Thread(r, name));

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            richard.mathis Richard Mathis
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated: