Skip to content

Commit a0aee9a

Browse files
committed
Remove code duplication in SearchFacet
1 parent 09818d6 commit a0aee9a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

driver-core/src/main/com/mongodb/client/model/search/SearchFacet.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ public <TDocument> BsonDocument toBsonDocument(final Class<TDocument> documentCl
141141
Map.Entry<String, BsonValue> entry = doc.entrySet().iterator().next();
142142
String name = entry.getKey();
143143
isTrue(format("facet names must be unique. '%s' is used at least twice in %s", names, facets), names.add(name));
144-
result.append(entry.getKey(), entry.getValue());
144+
result.append(name, entry.getValue());
145145
}
146146
return result;
147147
}

0 commit comments

Comments
 (0)