Result of object allocation ignored
Reports object allocations where the allocated object is ignored and neither assigned to a variable nor used in another way.
Such allocation expressions are legal in Java, but are usually either unintended, or evidence of a very odd object initialization strategy.
Use the options to list classes whose allocations should be ignored by this inspection.
Inspection options
Option | Type | Default |
---|---|---|
Ignored classes | StringList | [] |
Inspection Details | |
---|---|
Available in: | IntelliJ IDEA 2023.3, Qodana for JVM 2023.3 |
Plugin: | Java, 233.SNAPSHOT |
Last modified: 13 July 2023