-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: drivers
-
Labels:
-
2
Description
Hello,
our documentation pages at https://docs.mongodb.com/guides/server/read/ for Java and also http://mongodb.github.io/mongo-java-driver/4.0/driver/tutorials/perform-read-operations/ refer to the old forEach printBlock method, which no longer works.
I worked around the issue via the built-in Java 8 forEach and this consumer:
Consumer<Document> printBlock = new Consumer<Document>() { public void accept(final Document doc) { System.out.println(doc.toJson()); }; };