Remove canonicalizeType from IDLParserContext::checkAndAssertCollectionName

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Fixed
    • Priority: Major - P3
    • 8.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Server Security
    • Fully Compatible
    • Security 2024-12-09, Security 2024-12-23
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      This code

       const bool isUUID = (element.canonicalType() == canonicalizeBSONType(mongo::BinData) &&
      

      can be simplified by just using type().

      The other call

      element.canonicalType() == canonicalizeBSONType(mongo::String)
      

      can be simplified to

      type() == Symbol || type == String
      

      Same simplification can be done to CommandHelpers::parseNsCollectionRequired.

              Assignee:
              Tianyu Wang
              Reporter:
              Mark Benvenuto
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: