DBZ-167 Corrected the MongoUtil class

Corrected the `onCollection` utility method in the `MongoUtil` class to pass in the collection name rather than the database name.
This commit is contained in:
Randall Hauch 2016-12-20 16:24:07 -06:00
parent d1d21166b9
commit c1a26ee261

View File

@ -125,7 +125,7 @@ public static void onCollection(MongoClient client, String dbName, String collec
Consumer<MongoCollection<Document>> collectionOperation) {
onDatabase(client, dbName, db -> {
if (contains(db.listCollectionNames(), collectionName)) {
collectionOperation.accept(db.getCollection(dbName));
collectionOperation.accept(db.getCollection(collectionName));
}
});
}