Make canonicalizeName and wrapper functions return StatusWith

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Major - P3
    • 5.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Fully Compatible
    • Security 2021-08-09
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      canonicalizeName and its wrapper functions in in mongo_gssapi.cpp accept a std::string* as an out-parameter which they populate with a canonical name. These functions return a Status to indicate whether canonicalization was successful. Out-parameters aren't preferred in our codebase, because they aren't clear. Instead, we should modify the functions to return StatusWith<std::string>, which represents either a std::string, or a Status object containing an error. This style is more clear as to the intent of the returned string, and is assumed to have equivalent performance.

            Assignee:
            Erwin Pe
            Reporter:
            Spencer Jackson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: