Closed Bug 1316006 Opened 8 years ago Closed 8 years ago

[findbugs] [USELESS_STRING] Invocation of toString on selectionArgs

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: Shan11812, Mentored)

References

Details

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

Attachments

(1 file, 1 obsolete file)

Invocation of toString on selectionArgs in org.mozilla.gecko.db.AbstractTransactionalProvider.delete(Uri, String, String[])

Invocation of toString on selectionArgs in org.mozilla.gecko.db.AbstractTransactionalProvider.update(Uri, ContentValues, String, String[])

Invocation of toString on columns in org.mozilla.gecko.db.BaseTable.query(SQLiteDatabase, Uri, int, String[], String, String[], String, String, String)
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
(In reply to Sebastian Kaspari (:sebastian) from comment #0)
> Invocation of toString on selectionArgs in
> org.mozilla.gecko.db.AbstractTransactionalProvider.delete(Uri, String,
> String[])
> 
> Invocation of toString on selectionArgs in
> org.mozilla.gecko.db.AbstractTransactionalProvider.update(Uri,
> ContentValues, String, String[])
> 
> Invocation of toString on columns in
> org.mozilla.gecko.db.BaseTable.query(SQLiteDatabase, Uri, int, String[],
> String, String[], String, String, String)

Hi Sebastian,
The implicit calling of toString() returns just the Object datatype info.
Should I change it to display correct array? Or just remove it?
Hi Sebastian, first time bug fixer here. I am wondering if this bug is still available and if so may I work on it.
(In reply to Shan from comment #2)
> The implicit calling of toString() returns just the Object datatype info.
> Should I change it to display correct array? Or just remove it?

Yeah, I think in this case we want to log the contents of the array. So we should wrap it in Arrays.toString().
Assignee: nobody → 11812r
Status: NEW → ASSIGNED
Comment on attachment 8814380 [details]
Bug 1316006 - Change implicit toString() to Arrays.toString();

https://reviewboard.mozilla.org/r/95654/#review95692

LGTM. Thank you!

I pushed the patch to try:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=416b48e611de
Attachment #8814380 - Flags: review?(s.kaspari) → review+
Attachment #8814380 - Attachment is obsolete: true
Discarded the patch by mistake!
While pushing got some error and did it twice. Thought I was discarding the second push :|
Sorry!
I've couldn't find a way to undo it. Should I submit it again?
Flags: needinfo?(s.kaspari)
Comment on attachment 8814380 [details]
Bug 1316006 - Change implicit toString() to Arrays.toString();

Removed the obsolete flag. :)
Attachment #8814380 - Attachment is obsolete: false
Flags: needinfo?(s.kaspari)
It's still discarded on mozreview though. Yeah, I think you'll need to submit it again.
Attachment #8814380 - Attachment is obsolete: true
Comment on attachment 8814870 [details]
Bug 1316006 - Change implicit toString() to Arrays.toString();

https://reviewboard.mozilla.org/r/95980/#review95964
Attachment #8814870 - Flags: review?(s.kaspari) → review+
Pushed by s.kaspari@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/0c9297cc0e46
Change implicit toString() to Arrays.toString(); r=sebastian
https://hg.mozilla.org/mozilla-central/rev/0c9297cc0e46
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

Created:
Updated:
Size: