Bug 489706 - Replace new Integer() with Integer.valueOf()

There are a lot of new Integer() calls in the P2 codebase, which results
in many duplicate values of Integer being stored, particularly when
performing updates or checks. Integer.valueOf() performs this caching
already, which means that it's unnecessary to call new Integer() and
instead can call Integer.valueOf(). In the places where the int value is
being used directly, the call can be further optimised to
Integer.parseInt() instead.

Replace calls to new Integer() with Integer.valueOf() or .parseInt()
as appropriate.

Change-Id: Ic760e66084c856fc90cb7c8a358007c975213638
Signed-off-by: Alex Blewitt <alex.blewitt@gmail.com>
49 files changed