Inspectopedia Help

Field can be local

Reports redundant class fields that can be replaced with local variables.

If all local usages of a field are preceded by assignments to that field, the field can be removed, and its usages can be replaced with local variables.

Inspection options

Option

Type

Default

Additional special annotations

StringList

[]

Ignore fields used in multiple methods

Checkbox

true

Inspection Details

Available in:

IntelliJ IDEA 2023.3, Qodana for JVM 2023.3

Plugin:

Java, 233.SNAPSHOT

Last modified: 13 July 2023