[SERVER-9435] mongoutils::str::stripTrailing() is misnamed Created: 23/Apr/13 Updated: 25/Jan/17 Resolved: 12/Jun/15 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Internal Code |
| Affects Version/s: | None |
| Fix Version/s: | 3.1.5 |
| Type: | Improvement | Priority: | Minor - P4 |
| Reporter: | Tad Marshall | Assignee: | Andy Schwerin |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Backwards Compatibility: | Fully Compatible |
| Sprint: | Sharding 5 06/26/16 |
| Participants: |
| Description |
|
The function stripTrailing() in src/mongo/util/mongoutils/str.h does not strip trailing characters from its input string; it strips all occurrences of characters in the 'chars' string from its input string. The comment /** remove trailing chars in place */ is wrong. This function is only used in one place that I could find, in some Windows-specific error reporting code in acquirePathLock() in src/mongo/db/instance.cpp. |
| Comments |
| Comment by Githook User [ 12/Jun/15 ] |
|
Author: {u'username': u'andy10gen', u'name': u'Andy Schwerin', u'email': u'schwerin@mongodb.com'}Message: Per |