Last Comment Bug 710987 - Possible duplicate conditional in WordSplitState::FindSpecialWord()
: Possible duplicate conditional in WordSplitState::FindSpecialWord()
Status: RESOLVED FIXED
[pvs-studio][good first bug][lang=c++...
:
Product: Core
Classification: Components
Component: Spelling checker (show other bugs)
: unspecified
: All All
: -- normal (vote)
: mozilla11
Assigned To: Thomas Prip Vestergaard [:prip]
:
Mentors:
Depends on:
Blocks: 710966
  Show dependency treegraph
 
Reported: 2011-12-14 23:36 PST by Justin Dolske [:Dolske]
Modified: 2011-12-20 09:00 PST (History)
5 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Bug 710987 - Remove duplicate conditional (1.13 KB, patch)
2011-12-15 15:19 PST, Thomas Prip Vestergaard [:prip]
roc: review+
emorley: checkin+
Details | Diff | Splinter Review

Description Justin Dolske [:Dolske] 2011-12-14 23:36:14 PST
From http://www.viva64.com/en/a/0078/,
4th section in http://www.viva64.com/external-pictures/txt/mozilla-test.txt

V501 There are identical sub-expressions 'protocol.EqualsIgnoreCase ("ftp")' to the left and to the right of the '||' operator.
mozinlinespellwordutil.cpp 1034

Not a error. But one "protocol.EqualsIgnoreCase("ftp")" can be removed.

if (protocol.EqualsIgnoreCase("http") ||
    protocol.EqualsIgnoreCase("https") ||
    protocol.EqualsIgnoreCase("news") ||
    protocol.EqualsIgnoreCase("ftp") ||
    protocol.EqualsIgnoreCase("file") ||
    protocol.EqualsIgnoreCase("javascript") ||
    protocol.EqualsIgnoreCase("ftp")) {
Comment 1 Thomas Prip Vestergaard [:prip] 2011-12-15 15:19:41 PST
Created attachment 582123 [details] [diff] [review]
Bug 710987 - Remove duplicate conditional
Comment 2 Jared Wein [:jaws] (please needinfo? me) 2011-12-15 15:54:26 PST
prip: When you are happy with the state of the patch, please request review from gavin by setting the "review?" flag to "roc@ocallahan.org" and feedback from ryanvm by setting the "feedback?" flag to "ryanvm@gmail.com". Thanks for your contribution!
Comment 3 Jared Wein [:jaws] (please needinfo? me) 2011-12-15 15:55:55 PST
(In reply to Jared Wein [:jwein and :jaws] from comment #2)
> prip: When you are happy with the state of the patch, please request review
> from gavin by setting the "review?" flag to "roc@ocallahan.org" and feedback

Sorry, I meant to say to request review from gavin by setting the "review?" flag to "gavin.sharp@gmail.com".
Comment 4 Ryan VanderMeulen [:RyanVM] 2011-12-15 16:10:55 PST
I don't need to provide feedback on this. Thanks for asking, though :)
Comment 5 Ed Morley [:emorley] 2011-12-20 08:15:36 PST
Comment on attachment 582123 [details] [diff] [review]
Bug 710987 - Remove duplicate conditional

https://hg.mozilla.org/integration/mozilla-inbound/rev/6fcec9ac1164
Comment 6 Ed Morley [:emorley] 2011-12-20 09:00:40 PST
https://hg.mozilla.org/mozilla-central/rev/6fcec9ac1164

Note You need to log in before you can comment on or make changes to this bug.