[SERVER-22732] assert.contains() has unreachable code after return Created: 18/Feb/16  Updated: 19/Nov/16  Resolved: 25/Feb/16

Status: Closed
Project: Core Server
Component/s: Testing Infrastructure
Affects Version/s: None
Fix Version/s: 3.2.4, 3.3.3

Type: Bug Priority: Major - P3
Reporter: Michael Grundy Assignee: Michael Grundy
Resolution: Done Votes: 0
Labels: test-only
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Completed:
Steps To Reproduce:

Found with eslint

Sprint: TIG 11 (03/11/16)
Participants:
Linked BF Score: 0

 Description   

eslint found the following error:

src/mongo/shell/assert.js:135:13: Found unexpected statement after a return. [Error/no-unreachable]src/mongo/shell/servers.js:845:13: unnecessary ".apply()". [Error/no-useless-call]

The code should be modified to either reject anything that isn't an array or checks objects & scalars appropriately.



 Comments   
Comment by Githook User [ 25/Feb/16 ]

Author:

{u'username': u'mgrundy', u'name': u'Mike Grundy', u'email': u'michael.grundy@10gen.com'}

Message: SERVER-22732 assert.contains() has unreachable code after return

(cherry picked from commit 4e87684433692889660c57763fa5c188651b646d)
Branch: v3.2
https://github.com/mongodb/mongo/commit/1153076315b7a0fa7391a5b75e6bf16746a81fb5

Comment by Githook User [ 25/Feb/16 ]

Author:

{u'username': u'mgrundy', u'name': u'Mike Grundy', u'email': u'michael.grundy@10gen.com'}

Message: SERVER-22732 assert.contains() has unreachable code after return
Branch: master
https://github.com/mongodb/mongo/commit/4e87684433692889660c57763fa5c188651b646d

Generated at Thu Feb 08 04:01:16 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.