File tree Expand file tree Collapse file tree
branches/tswast-patch-1/gcloud-java-core/src/main/java/com/google/gcloud Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -57,5 +57,5 @@ refs/tags/v0.18.0: 9d193c4c4b9d1c6f21515dd8e50836b9194ec9bb
5757refs/tags/v0.19.0: e67b56e4d8dad5f9a7b38c9b2107c23c828f2ed5
5858refs/tags/v0.20.0: 839f7fb7156535146aa1cb2c5aadd8d375d854e8
5959refs/tags/v0.20.1: 370471f437f1f4f68a11e068df5cd6bf39edb1fa
60- refs/heads/tswast-patch-1: 7a723996f7c352fd93ceae91f41e474de256873d
60+ refs/heads/tswast-patch-1: 076127d6ce599716519eeffd5595fe8c5313b5df
6161refs/heads/pubsub-streaming-pull: 19262b752ee874eb2ca3b950eb2aef44d5a5267b
Original file line number Diff line number Diff line change @@ -50,18 +50,14 @@ static class PageIterator<T> extends AbstractIterator<T> {
5050
5151 @ Override
5252 protected T computeNext () {
53- if (currentPageIterator .hasNext ()) {
54- return currentPageIterator .next ();
55- }
56- Page <T > nextPage = currentPage .nextPage ();
57- if (nextPage != null ) {
58- currentPage = nextPage ;
59- currentPageIterator = currentPage .values ().iterator ();
60- if (currentPageIterator .hasNext ()) {
61- return currentPageIterator .next ();
53+ while (!currentPageIterator .hasNext ()) {
54+ currentPage = currentPage .nextPage ();
55+ if (currentPage == null ) {
56+ return endOfData ();
6257 }
58+ currentPageIterator = currentPage .values ().iterator ();
6359 }
64- return endOfData ();
60+ return currentPageIterator . next ();
6561 }
6662 }
6763
You can’t perform that action at this time.
0 commit comments