Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-9435

mongoutils::str::stripTrailing() is misnamed

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 3.1.5
    • Affects Version/s: None
    • Component/s: Internal Code
    • Labels:
      None
    • Fully Compatible
    • Sharding 5 06/26/16

      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.

            Assignee:
            schwerin@mongodb.com Andy Schwerin
            Reporter:
            tad Tad Marshall
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: