Comparison of strings using ==

RESOLVED FIXED in Firefox 11

Status

()

Firefox for Android
General
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: mfinkle, Assigned: mfinkle)

Tracking

unspecified
Firefox 12
x86
Linux
Points:
---

Firefox Tracking Flags

(firefox11 fixed, firefox12 fixed)

Details

Attachments

(1 attachment, 1 obsolete attachment)

Created attachment 585352 [details] [diff] [review]
patch

AFAIK, we can only use String1.equal(String2) to compare strings in Java, unless the strings are constants.

This patch fixes 2 places I found that use ==
Attachment #585352 - Flags: review?(doug.turner)

Updated

5 years ago
Attachment #585352 - Flags: review?(doug.turner) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/0284b1ff46c6
had to backout because of some NullPointerException (mLastUri and mLastTitle can be null)

https://hg.mozilla.org/integration/mozilla-inbound/rev/1d00e560e0dc

I'll get a new patch soon

Updated

5 years ago
Attachment #585352 - Flags: review+ → review-
Created attachment 585406 [details] [diff] [review]
patch 2

This patch uses mUri.equals, since mUri is not null. I also dropped the mTitle check since mUri is unique enough.

This patch passed Try server
Assignee: nobody → mark.finkle
Attachment #585352 - Attachment is obsolete: true
Attachment #585406 - Flags: review?(doug.turner)

Updated

5 years ago
Attachment #585406 - Flags: review?(doug.turner) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/c90dc56f83f0
https://hg.mozilla.org/mozilla-central/rev/c90dc56f83f0
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 12
Comment on attachment 585406 [details] [diff] [review]
patch 2

[Approval Request Comment]
Code cleanup. No risk

Uses the correct method to compare strings. The SnapshotSessionRunnable code could have been being called too often before this patch.
Attachment #585406 - Flags: approval-mozilla-aurora?

Comment 7

5 years ago
Comment on attachment 585406 [details] [diff] [review]
patch 2

[Triage Comment]
Mobile only - approved for Aurora.
Attachment #585406 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
https://hg.mozilla.org/releases/mozilla-aurora/rev/5e4a83c69eef
status-firefox11: --- → fixed
status-firefox12: --- → fixed
You need to log in before you can comment on or make changes to this bug.