Inspectopedia
 
2024.3

Method with more than three negations

Warning
New
Last modified: 03 December 2024

Reports methods with three or more negations. Such methods may be confusing.

Example:

Without negations, the method becomes easier to understand:

Configure the inspection:

  • Use the Ignore negations in 'equals()' methods option to disable the inspection within equals() methods.

  • Use the Ignore negations in 'assert' statements to disable the inspection within assert statements.