Closed Bug 1510667 Opened 6 years ago Closed 3 years ago

Performance Warning: Should use valueOf instead of new

Categories

(GeckoView :: General, enhancement, P5)

Unspecified
Android
enhancement

Tracking

(firefox96 fixed)

RESOLVED FIXED
96 Branch
Tracking Status
firefox96 --- fixed

People

(Reporter: fluffyemily, Assigned: m_kato)

References

(Blocks 1 open bug)

Details

(Keywords: good-first-bug)

Attachments

(1 file)

You should not call the constructor for wrapper classes directly, such as`new Integer(42)`. Instead, call the valueOf factory method, such as Integer.valueOf(42). This will typically use less memory because common integers such as 0 and 1 will share a single instance. Affected Classes: GeckoAppShell
Keywords: good-first-bug
OS: Unspecified → Android
Priority: -- → P5
Product: Firefox for Android → GeckoView
Assignee: nobody → m_kato
Status: NEW → ASSIGNED
Pushed by m_kato@ga2.so-net.ne.jp: https://hg.mozilla.org/integration/autoland/rev/19d8c3a76b9c Performance Warning: Should use valueOf instead of new. r=geckoview-reviewers,calu
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 96 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: