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

mongoutils::str::stripTrailing() is misnamed

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Done
    • Icon: Minor - P4 Minor - P4
    • 3.1.5
    • None
    • Internal Code
    • None
    • Fully Compatible
    • Sharding 5 06/26/16

    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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: