[findbugs] [USELESS_STRING] Invocation of toString on selectionArgs

RESOLVED FIXED in Firefox 53

Status

()

Firefox for Android
General
P3
normal
RESOLVED FIXED
6 months ago
5 months ago

People

(Reporter: sebastian, Assigned: Shan11812, Mentored)

Tracking

(Blocks: 1 bug)

unspecified
Firefox 53
All
Android
Points:
---

Firefox Tracking Flags

(firefox53 fixed)

Details

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

MozReview Requests

()

Submitter Diff Changes Open Issues Last Updated
Loading...
Error loading review requests:

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

6 months ago
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)
(Reporter)

Comment 1

6 months ago
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
(Assignee)

Comment 2

5 months ago
(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?

Comment 3

5 months ago
Hi Sebastian, first time bug fixer here. I am wondering if this bug is still available and if so may I work on it.
(Reporter)

Comment 4

5 months ago
(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().
Comment hidden (mozreview-request)
(Reporter)

Updated

5 months ago
Assignee: nobody → 11812r
Status: NEW → ASSIGNED
(Reporter)

Comment 6

5 months ago
mozreview-review
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+
(Assignee)

Updated

5 months ago
Attachment #8814380 - Attachment is obsolete: true
(Assignee)

Comment 7

5 months ago
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)
(Reporter)

Comment 8

5 months ago
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)
(Reporter)

Comment 9

5 months ago
It's still discarded on mozreview though. Yeah, I think you'll need to submit it again.
Comment hidden (mozreview-request)
(Reporter)

Updated

5 months ago
Attachment #8814380 - Attachment is obsolete: true
(Reporter)

Comment 11

5 months ago
mozreview-review
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+

Comment 12

5 months ago
Pushed by s.kaspari@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/0c9297cc0e46
Change implicit toString() to Arrays.toString(); r=sebastian

Comment 13

5 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/0c9297cc0e46
Status: ASSIGNED → RESOLVED
Last Resolved: 5 months ago
status-firefox53: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 53
You need to log in before you can comment on or make changes to this bug.