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

Extends implementation S1612 to cover null checks

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 4.2.1
    • Fix Version/s: 4.3
    • Component/s: Rules
    • Labels:
      None

      Description

      Null check in lambda can also be replaced by method references:

      Non null test: v -> v != null by Objects::nonNull
      Null test : v -> v == null by Objects::isNull

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Due:
                Created:
                Updated:
                Resolved: