Inspectopedia Help

Constant assert argument

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:

assertNotNull("foo");

Inspection Details

Available in:

IntelliJ IDEA 2023.3, Qodana for JVM 2023.3

Plugin:

Java, 233.SNAPSHOT

Last modified: 13 July 2023