The Java driver function DBCollection.aggregate takes in a List<DBObject>, which has the consequence that you'll get a compiler error if you pass in a List<BasicDBObject> instead. This issue could be eliminated by changing the function to take List<? extends DBObject> instead. It appears that similar issues exist for DBCollection.explainAggregate and DBCollection.insert.
- is duplicated by
-
JAVA-1476 Make DBCollection insert(List...) methods covariant
- Closed