Closed
Bug 1081597
Opened 10 years ago
Closed 10 years ago
Unwrap confusing else statements
Categories
(Firefox for Android Graveyard :: General, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
Firefox 35
People
(Reporter: ckitching, Assigned: ckitching)
Details
Attachments
(1 file)
38.96 KB,
patch
|
rnewman
:
review+
|
Details | Diff | Splinter Review |
When you have something like: if (...) { ... return; } else { // Stuff } You can remove the Stuff out of the else branch. Such else statements seem to exist only to confuse people. ... Sometimes. In related news, a bunch of these are crying out to be converted to switch statements, so I did that, too. (Now we have source level 7 we can switch on strings. Still compiles to the same thing but is rather nicer to read). ... Maybe useful? Prettymuch automated, anyway...
Assignee | ||
Comment 1•10 years ago
|
||
Attachment #8503704 -
Flags: review?(rnewman)
Comment 3•10 years ago
|
||
Comment on attachment 8503704 [details] [diff] [review] Refactor some branches Review of attachment 8503704 [details] [diff] [review]: ----------------------------------------------------------------- Looks good. Upstream needed. ::: mobile/android/base/prompts/PromptInput.java @@ +367,3 @@ > } > + > + break; Just `return null` right here and not below.
Attachment #8503704 -
Flags: review?(rnewman) → review+
Assignee | ||
Comment 4•10 years ago
|
||
https://hg.mozilla.org/integration/fx-team/rev/0fcf464736d7
Comment 5•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/0fcf464736d7
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 35
Updated•3 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
•