Closed Bug 1316002 Opened 8 years ago Closed 8 years ago

[findbugs] [DE] Comparison of String objects using == or != in org.mozilla.gecko.home.HomeAdapter$PanelInfo.getClassName(Context)

Categories

(Firefox for Android Graveyard :: General, defect, P3)

All
Android
defect

Tracking

(firefox53 fixed)

RESOLVED FIXED
Firefox 53
Tracking Status
firefox53 --- fixed

People

(Reporter: sebastian, Assigned: swaroop.rao, Mentored)

References

Details

(Whiteboard: [MobileAS][lang=java][good first bug])

Attachments

(1 file)

Comparison of String objects using == or != in org.mozilla.gecko.home.HomeAdapter$PanelInfo.getClassName(Context) 

"This code compares java.lang.String objects for reference equality using the == or != operators. Unless both strings are either constants in a source file, or have been interned using the String.intern() method, the same string value may be represented by two different String objects. Consider using the equals(Object) method instead."
Whiteboard: [lang=java][good first bug] → [MobileAS][lang=java][good first bug]
To start, set up a build environment - you can see the instructions here:
https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Build_Instructions/Simple_Firefox_for_Android_build

Then, you'll need to upload a patch - see:
http://mozilla-version-control-tools.readthedocs.io/en/latest/mozreview/commits.html

If you need any help, you can reply to this bug, or feel free to message me on IRC - my nick is "sebastian" and you can find me and other helpful folks in #mobile. If you need IRC setup instructions, see https://wiki.mozilla.org/IRC
I have submitted a patch for this using MozReview. Is there anything else I need to do for this?
Assignee: nobody → swaroop.rao
Status: NEW → ASSIGNED
Comment on attachment 8809925 [details]
Bug 1316002: Fixed '==' comparison of strings;

https://reviewboard.mozilla.org/r/92404/#review92940

That's perfect. Thanks!
Attachment #8809925 - Flags: review?(s.kaspari) → review+
I triggered a try run. If our tests pass then you can add the "checkin-needed" keyword to the bug and someone will land the patch for you!

https://treeherder.mozilla.org/#/jobs?repo=try&revision=e1f54f33a628
Keywords: checkin-needed
Pushed by cbook@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/d444cb9e676d
Fixed '==' comparison of strings; r=sebastian
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/d444cb9e676d
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 53
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: