For a code excerpt like the following
int a;
Integer b = new Integer(1);
a = b.intValue();
the Java
compiler generates an "Unnecessary unboxing" warning.
Is that superfluous, or is there more substance behind it? Other answers (like this and that) seem to hinder towards auto-boxing and auto-unboxing being expensive when used extensively, but of negligible to zero impact when done a few times only.