Inspectopedia Help

Method call can be replaced with operator invocation

Reports method calls that can be replaced with operator invocations.

Example:

a.plus(b)

After the quick-fix is applied:

a + b

Inspection options

Option

Type

Default

Use double negation (i.e. !!)

Checkbox

true

Replace 'compareTo' equality to equals (i.e. ==)

Checkbox

true

Do not suggest replace with operator if it entails additional parentheses

Checkbox

false

Inspection Details

Available in:

IntelliJ IDEA 2023.3, Qodana for JVM 2023.3

Plugin:

Groovy, 233.SNAPSHOT

Last modified: 13 July 2023