DESCRIPTION

Use Number.valueOf instead of constructors.

Using new Integer(int) is guaranteed to always result in a new object
whereas Integer.valueOf(int) allows caching of values to be done by the
compiler, class library, or JVM. Using of cached values avoids object
allocation and the code will be faster.

Values between -128 and 127 are guaranteed to have corresponding cached
instances and using valueOf is approximately 3.5 times faster than using
constructor. For values outside the constant range the performance of
both styles is the same. 

Change-Id: I3c107cc0f6536aa96d3c84941bb6be8f2539c5f3


COMMENTS

author: Nathanael Holden
date: 2012-08-29 14:01:06.000000000

Patch Set 1: Verified; Looks good to me, approved; IP review completed

This looks fine to me.

-------------------------------------
author: Gerrit Code Review
date: 2012-08-29 14:01:25.000000000

Your change could not be merged due to a path conflict.

Please merge (or rebase) the change locally and upload the resolution for review.

-------------------------------------
