Apache9 commented on code in PR #4646:
URL: https://github.com/apache/hbase/pull/4646#discussion_r928711510


##########
hbase-endpoint/src/test/java/org/apache/hadoop/hbase/coprocessor/TestSecureExport.java:
##########
@@ -389,11 +389,9 @@ public void testVisibilityLabels() throws IOException, 
Throwable {
         try (Connection conn = 
ConnectionFactory.createConnection(UTIL.getConfiguration());
           Table table = conn.getTable(importHtd.getTableName());
           ResultScanner scanner = table.getScanner(scan)) {
-          int count = 0;
-          for (Result r : scanner) {
-            ++count;
-          }
-          assertEquals(rowCount, count);
+          MutableInt count = new MutableInt();
+          scanner.forEach((r) -> count.increment());

Review Comment:
   Unnecessary parentheses :)
   
   And we could just use Iterables.size.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to