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

FP in S2970 when "assertThatThrownBy" is used alone

    Details

    • Type: False-Positive
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 6.6
    • Component/s: Rules
    • Labels:

      Description

      assertThatThrownBy does not behave exactly like any other assert methods: it asserts that an exception is thrown by the code. It means that use alone, without adding any assertion predicate afterwards, is a valid use case.

      We should remove the support for "assertThatThrownBy" in S2970.

      See SONARJAVA-3398

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                quentin.jaquier Quentin Jaquier
                Reporter:
                quentin.jaquier Quentin Jaquier
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Due:
                  Created:
                  Updated:
                  Resolved: