Inspectopedia
 
2024.3

Constant assert argument

Warning
New
Last modified: 03 December 2024

Reports constant arguments in assertTrue(), assertFalse(), assertNull(), and assertNotNull() calls.

Calls to these methods with constant arguments will either always succeed or always fail. Such statements can easily be left over after refactoring and are probably not intended.

Example: