SERVER-96057Open

Clarify safety of bson element accessors

In BSONElement, accessors have varying degrees of safeness which aren't entirely clear from the naming. We should assess our nomenclature to make their status clear, BF-35346 resulted from one being used in an unsafe manner.   From my initial investigation, we can categorize them into 4-5 levels of safety: *Checks for type correctness and uassert if needed* String() checkAndGetStringData() Date() Number() Decimal() Double() Long() Int() Bool() Array() OID() Obj() Val(Type

Affected Versions
Versions known to exhibit this issue

No affected versions recorded.

Fixed Versions
Versions that include the fix

No fix available yet.

Components
Server components related to this issue

No components specified.

Labels
Tags and classification
sp-bson