commit | bff55f297a5c1f61add01419da9671cfea908c46 | [log] [tgz] |
---|---|---|
author | Alex Blewitt <alex.blewitt@gmail.com> | Wed Mar 16 01:30:35 2016 +0000 |
committer | Alex Blewitt <alex.blewitt@gmail.com> | Tue Apr 19 03:34:01 2016 -0500 |
tree | c1438bc3be529485b3965a66c4a4cc1893d2320c | |
parent | 30aa50233fe07edc71b6729f7690454170215932 [diff] |
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>