Inspectopedia Help

Auto-boxing

Reports expressions that are affected by autoboxing conversion (automatic wrapping of primitive values as objects). Try not to use objects instead of primitives. It might significantly affect performance.

Example:

Integer x = 42;

The quick-fix makes the conversion explicit:

Integer x = Integer.valueOf(42);

AutoBoxing appeared in Java 5. This inspection can help to downgrade for backward compatibility with earlier Java versions.

Inspection options

Option

Type

Default

Ignore expressions added to a collection

Checkbox

false

Inspection Details

Available in:

IntelliJ IDEA 2023.3, Qodana for JVM 2023.3

Plugin:

Java, 233.SNAPSHOT

Last modified: 13 July 2023