User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:58.0) Gecko/20100101 Firefox/58.0 Build ID: 20171101104430 Steps to reproduce: Ran error-prone with BoxedPrimitiveConstructor enabled Actual results: error-prone warns about an unneeded allocation.
The former autoboxes to an Integer and uses the Integer object cache to avoid allocations.
The former uses the Integer object cache to avoid allocations.
Updated to use Integer.valueOf as suggested by :nalexander in bug 1382049.
Attachment #8924229 - Flags: review?(s.kaspari) → review?(cnevinchen)
Attachment #8924229 - Flags: review?(cnevinchen) → review+
Andrew: sorry that these tickets are getting the response times they should be. Please don't be discouraged!
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Attachment #8924229 - Flags: review?(nalexander) → review+
Pushed by email@example.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/255f29fb55ce Prefer Integer.valueOf over new Integer. r=nalexander,nechen
You need to log in before you can comment on or make changes to this bug.