Skip to content

Conversation

@katcharov
Copy link
Collaborator

@katcharov katcharov requested a review from vbabanin June 20, 2023 15:47
Comment on lines +257 to +264
private static BsonValue wrapString(final String s) {
BsonString bson = new BsonString(s);
if (s.contains("$")) {
return new BsonDocument("$literal", bson);
} else {
return bson;
}
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe "$" is the only character that would cause a string to need to be wrapped.

Copy link
Member

@rozza rozza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@katcharov katcharov merged commit 86b43d6 into mongodb:master Jun 20, 2023
@katcharov katcharov deleted the JAVA-4884 branch July 14, 2023 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants