-
Type: Bug
-
Resolution: Fixed
-
Priority: Minor - P4
-
Affects Version/s: None
-
Component/s: Internal Code
-
Fully Compatible
-
ALL
-
Platforms 2018-08-27, Platforms 2018-09-10
Not restoring the stream format state of an ostream
Defect 104963 (STATIC_C)
Checker STREAM_FORMAT_STATE (subcategory none)
File: /src/mongo/bson/bsonelement.cpp
Function mongo::BSONElement::jsonStringStream(mongo::JsonStringFormat, bool, int, std::__cxx11::basic_stringstream<char, std::char_traits<char>, std::allocator<char>> &) const
/src/mongo/bson/bsonelement.cpp, line: 90
"precision" changes the format state of "s" for category precision.
s.precision(16);
/src/mongo/bson/bsonelement.cpp, line: 314
Changing format state of stream "s" for category precision without later restoring it.
}
File: /src/mongo/bson/bsonelement.cpp
Function mongo::BSONElement::jsonStringStream(mongo::JsonStringFormat, bool, int, std::__cxx11::basic_stringstream<char, std::char_traits<char>, std::allocator<char>> &) const
/src/mongo/bson/bsonelement.cpp, line: 209
"hex" changes the format state of "s" for category basefield.
s << "\", \"$type\" : \"" << hex;
/src/mongo/bson/bsonelement.cpp, line: 211
"fill" changes the format state of "s" for category fill.
s.fill('0');
/src/mongo/bson/bsonelement.cpp, line: 212
"dec" changes the format state of "s" for category basefield.
s << type << dec;
/src/mongo/bson/bsonelement.cpp, line: 314
Changing format state of stream "s" for category fill without later restoring it.
}
- related to
-
SERVER-36475 Reduce use of stringstream in BSONObj.jsonString
- Closed