accumulo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Medinets <david.medin...@gmail.com>
Subject ExportTable.isReady - alternative to for loop?
Date Thu, 06 Sep 2012 02:20:32 GMT
This is the code I am looking at:

    // TODO look for walogs
    for (Entry<Key,Value> entry : metaScanner) {
      return 500;
    }

    return 0;

FindBugs complains that entry is unused. Does it make sense to replace
that code with:

  return metaScanner.iterator().hasNext() ? 500 : 0;

Mime
View raw message