Boxing of already boxed value
Reports boxing of already boxed values.
This is a redundant operation since any boxed value will first be auto-unboxed before boxing the value again. If done inside an inner loop, such code may cause performance problems.
Example:
Integer value = 1;
method(Integer.valueOf(value));
After the quick fix is applied:
Integer value = 1;
method(value);
Inspection Details | |
---|---|
Available in: | IntelliJ IDEA 2023.3, Qodana for JVM 2023.3 |
Plugin: | Java, 233.SNAPSHOT |
Last modified: 13 July 2023