Closed
Bug 778472
Opened 13 years ago
Closed 13 years ago
Clean up Java imports
Categories
(Firefox for Android Graveyard :: General, defect, P4)
Tracking
(firefox16 wontfix, firefox17 fixed)
RESOLVED
FIXED
Firefox 17
People
(Reporter: cpeterson, Assigned: cpeterson)
References
Details
Attachments
(3 files)
|
16.38 KB,
patch
|
mfinkle
:
review+
|
Details | Diff | Splinter Review |
|
17.92 KB,
patch
|
mfinkle
:
review+
|
Details | Diff | Splinter Review |
|
127.98 KB,
patch
|
mfinkle
:
review+
|
Details | Diff | Splinter Review |
No description provided.
| Assignee | ||
Comment 1•13 years ago
|
||
Part 1: Remove unused and redundant import statements.
Attachment #646892 -
Flags: review?(mark.finkle)
| Assignee | ||
Comment 2•13 years ago
|
||
Part 2: Replace wildcard import statements with fully-qualified names, as per Google's style guide for Android Java code. This makes tracking dependencies and finding unused import statements easier.
https://source.android.com/source/code-style.html#fully-qualify-imports
Attachment #646894 -
Flags: review?(mark.finkle)
| Assignee | ||
Comment 3•13 years ago
|
||
I have a patch part 3 that cleans up our haphazard ordering of import statements, but I am waiting for feedback from m.d.p.m. re the correct order.
Comment 4•13 years ago
|
||
Comment on attachment 646892 [details] [diff] [review]
part-1-remove-unused-imports.patch
Are you using a tool to help with this or just eye-balling it? Tools like PMD and FindBugs will find this bad imports too.
Attachment #646892 -
Flags: review?(mark.finkle) → review+
Updated•13 years ago
|
Attachment #646894 -
Flags: review?(mark.finkle) → review+
| Assignee | ||
Comment 5•13 years ago
|
||
(In reply to Mark Finkle (:mfinkle) from comment #4)
> Are you using a tool to help with this or just eye-balling it? Tools like
> PMD and FindBugs will find this bad imports too.
I'm using Checkstyle: http://checkstyle.sourceforge.net/
| Assignee | ||
Updated•13 years ago
|
Whiteboard: [leave open]
| Assignee | ||
Comment 6•13 years ago
|
||
Comment 7•13 years ago
|
||
| Assignee | ||
Comment 8•13 years ago
|
||
Part 3: Standardize order of import statements from most project-specific to least:
1. Project-specific imports: org.mozilla
2. Third-party libraries: com, net, org
3. System libraries: android
4. Language features: java
I have an opinion on the order of the imports (most-to-least or least-to-most), but I think any standard is better than none. On m.d.p.m., kats concurred that the most-to-least order was reasonable and no one voiced any other opinions or opposition.
Attachment #647681 -
Flags: review?(mark.finkle)
Updated•13 years ago
|
Attachment #647681 -
Flags: review?(mark.finkle) → review+
| Assignee | ||
Comment 9•13 years ago
|
||
Landed patch 3/3:
https://hg.mozilla.org/integration/mozilla-inbound/rev/d14731ba12c1
Whiteboard: [leave open]
Comment 10•13 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Updated•4 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•