bookkeeper-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From si...@apache.org
Subject bookkeeper git commit: BOOKKEEPER-955: in listLedgers method currentRange variable has to be…
Date Tue, 29 Nov 2016 23:07:46 GMT
Repository: bookkeeper
Updated Branches:
  refs/heads/master 66515e74d -> 4cf097871


BOOKKEEPER-955: in listLedgers method currentRange variable has to be…

… updated to the next iterator

in BookKeeperAdmin listLedgers method currentRange variable is not getting updated to next
iterator
when it has run out of elements

Author: Charan Reddy Guttapalem <cguttapalem@salesforce.com>

Reviewers: Venkateswararao Jujjuri <vjujjuri@salesforce.com>

Closes #63 from reddycharan/listledgersfix


Project: http://git-wip-us.apache.org/repos/asf/bookkeeper/repo
Commit: http://git-wip-us.apache.org/repos/asf/bookkeeper/commit/4cf09787
Tree: http://git-wip-us.apache.org/repos/asf/bookkeeper/tree/4cf09787
Diff: http://git-wip-us.apache.org/repos/asf/bookkeeper/diff/4cf09787

Branch: refs/heads/master
Commit: 4cf097871d28b70a53f8c6bffaf1c2022e9953b2
Parents: 66515e7
Author: Charan Reddy Guttapalem <cguttapalem@salesforce.com>
Authored: Tue Nov 29 15:07:42 2016 -0800
Committer: Sijie Guo <sijie@apache.org>
Committed: Tue Nov 29 15:07:42 2016 -0800

----------------------------------------------------------------------
 .../java/org/apache/bookkeeper/client/BookKeeperAdmin.java    | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/bookkeeper/blob/4cf09787/bookkeeper-server/src/main/java/org/apache/bookkeeper/client/BookKeeperAdmin.java
----------------------------------------------------------------------
diff --git a/bookkeeper-server/src/main/java/org/apache/bookkeeper/client/BookKeeperAdmin.java
b/bookkeeper-server/src/main/java/org/apache/bookkeeper/client/BookKeeperAdmin.java
index bec0e81..f528455 100644
--- a/bookkeeper-server/src/main/java/org/apache/bookkeeper/client/BookKeeperAdmin.java
+++ b/bookkeeper-server/src/main/java/org/apache/bookkeeper/client/BookKeeperAdmin.java
@@ -1025,10 +1025,9 @@ public class BookKeeperAdmin {
                     }
 
                     @Override
-                    public Long next()
-                    throws NoSuchElementException {
-                        try{
-                            if (currentRange == null) {
+                    public Long next() throws NoSuchElementException {
+                        try {
+                            if ((currentRange == null) || (!currentRange.hasNext())) {
                                 currentRange = iterator.next().getLedgers().iterator();
                             }
                         } catch (IOException e) {


Mime
View raw message