options.upsert(arguments.getBoolean("upsert").getValue());
}
if (arguments.containsKey("returnDocument")) {
options.returnDocument(arguments.getString("returnDocument").getValue().equals("After") ? ReturnDocument.AFTER
: ReturnDocument.BEFORE);
<BUG>}
collection.findOneAndReplace(arguments.getDocument("filter"), arguments.getDocument("replacement"), options, getCallback());</BUG>
}
};
}

options.upsert(arguments.getBoolean("upsert").getValue());
}
if (arguments.containsKey("returnDocument")) {
options.returnDocument(arguments.getString("returnDocument").getValue().equals("After") ? ReturnDocument.AFTER
: ReturnDocument.BEFORE);
}
if (arguments.containsKey("collation")) {
options.collation(getCollation(arguments.getDocument("collation")));
}
collection.findOneAndReplace(arguments.getDocument("filter"), arguments.getDocument("replacement"), options, getCallback());
}
};
}
