Description
The asynchronous pagination examples in README.md pass a page-consuming lambda to CompletableFuture.thenRun, but thenRun accepts a zero-argument Runnable and does not provide the completed page.
Reproduction
Copy any of the async pagination examples around README.md lines 1346, 1351, or 1369 into a Java source file:
pageFuture.thenRun(page -> page.autoPager().subscribe(job -> {
System.out.println(job);
}));
Compile the example with the SDK dependencies.
Expected behavior
The documentation should use a CompletableFuture method whose callback receives the completed page.
Actual behavior
The examples fail to compile because the lambda has one parameter while thenRun expects a no-argument Runnable.
Why this matters
Users following the documented async pagination examples encounter a compile error before making any API request.
Suggested fix
Replace thenRun with thenAccept in all three async pagination examples.
Description
The asynchronous pagination examples in
README.mdpass a page-consuming lambda toCompletableFuture.thenRun, butthenRunaccepts a zero-argumentRunnableand does not provide the completed page.Reproduction
Copy any of the async pagination examples around
README.mdlines 1346, 1351, or 1369 into a Java source file:Compile the example with the SDK dependencies.
Expected behavior
The documentation should use a
CompletableFuturemethod whose callback receives the completed page.Actual behavior
The examples fail to compile because the lambda has one parameter while
thenRunexpects a no-argumentRunnable.Why this matters
Users following the documented async pagination examples encounter a compile error before making any API request.
Suggested fix
Replace
thenRunwiththenAcceptin all three async pagination examples.