Closed Bug 1413620 Opened 7 years ago Closed 7 years ago

Fix BoxedPrimitiveConstructor error-prone warnings

Categories

(Firefox for Android Graveyard :: General, defect)

defect
Not set
normal

Tracking

(firefox59 fixed)

RESOLVED FIXED
Firefox 59
Tracking Status
firefox59 --- fixed

People

(Reporter: andrew, Assigned: andrew)

Details

Attachments

(1 file, 1 obsolete file)

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.
Attachment #8924224 - Flags: review?(s.kaspari)
Attachment #8924224 - Flags: review?(nalexander)
The former uses the Integer object cache to avoid allocations.
Attachment #8924229 - Flags: review?(s.kaspari)
Attachment #8924229 - Flags: review?(nalexander)
Updated to use Integer.valueOf as suggested by :nalexander in bug 1382049.
Attachment #8924224 - Attachment is obsolete: true
Attachment #8924224 - Flags: review?(s.kaspari)
Attachment #8924224 - Flags: review?(nalexander)
Attachment #8924229 - Flags: review?(s.kaspari) → review?(cnevinchen)
Assignee: nobody → andrew
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
Keywords: checkin-needed
Attachment #8924229 - Flags: review?(nalexander) → review+
Pushed by nbeleuzu@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/255f29fb55ce
Prefer Integer.valueOf over new Integer. r=nalexander,nechen
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/255f29fb55ce
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 58
Target Milestone: Firefox 58 → Firefox 59
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: