Fix BoxedPrimitiveConstructor error-prone warnings

RESOLVED FIXED in Firefox 59

Status

()

defect
RESOLVED FIXED
2 years ago
a year ago

People

(Reporter: andrew, Assigned: andrew)

Tracking

Trunk
Firefox 59
Points:
---

Firefox Tracking Flags

(firefox59 fixed)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

2 years ago
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.
(Assignee)

Comment 1

2 years ago
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)
(Assignee)

Comment 2

2 years ago
The former uses the Integer object cache to avoid allocations.
Attachment #8924229 - Flags: review?(s.kaspari)
Attachment #8924229 - Flags: review?(nalexander)
(Assignee)

Comment 3

2 years ago
Updated to use Integer.valueOf as suggested by :nalexander in bug 1382049.
(Assignee)

Updated

2 years ago
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+

Comment 5

a year ago
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

Comment 6

a year ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/255f29fb55ce
Status: ASSIGNED → RESOLVED
Last Resolved: a year ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 58
Target Milestone: Firefox 58 → Firefox 59
You need to log in before you can comment on or make changes to this bug.