Skip to content

Commit 8feecb3

Browse files
Added code comment
1 parent bf7eb81 commit 8feecb3

File tree

1 file changed

+3
-0
lines changed
  • document-store/src/main/java/org/hypertrace/core/documentstore/mongo

1 file changed

+3
-0
lines changed

document-store/src/main/java/org/hypertrace/core/documentstore/mongo/MongoUtils.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,9 @@ public static ReturnDocument getReturnDocument(final ReturnDocumentType returnDo
133133
}
134134

135135
private static ObjectNode wrapInLiteral(final ObjectNode objectNode) {
136+
/* Wrapping the subDocument with $literal to be able to provide empty object "{}" as value
137+
* Throws error otherwise if empty object is provided as value.
138+
* https://jira.mongodb.org/browse/SERVER-54046 */
136139
final ObjectNode node = JsonNodeFactory.instance.objectNode();
137140
node.set(LITERAL, objectNode);
138141
return node;

0 commit comments

Comments
 (0)