UnnecessaryBoxedAssignment
This expression can be implicitly boxed.

Severity
SUGGESTION

The problem

The Java language automatically converts primitive types to their boxed representations in some contexts (see JLS 5.1.7).

That is, prefer this:

int x;
Integer y = x;

to the equivalent but more verbose explicit conversion:

int x;
Integer y = Integer.valueOf(x);

Suppression

Suppress false positives by adding the suppression annotation @SuppressWarnings("UnnecessaryBoxedAssignment") to the enclosing element.