ndimiduk commented on a change in pull request #4106:
URL: https://github.com/apache/hbase/pull/4106#discussion_r831240347



##########
File path: 
hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncTableImpl.java
##########
@@ -232,22 +233,29 @@ public ResultScanner getScanner(Scan scan) {
   }
 
   private void scan0(Scan scan, ScanResultConsumer consumer) {
-    try (ResultScanner scanner = getScanner(scan)) {
-      consumer.onScanMetricsCreated(scanner.getScanMetrics());
-      for (Result result; (result = scanner.next()) != null;) {
-        if (!consumer.onNext(result)) {
-          break;
+    Span span = null;
+    try (AsyncTableResultScanner scanner = rawTable.getScanner(scan)) {
+      span = scanner.getSpan();

Review comment:
       Okay, I'm simplifying this according to the hints provided by the IDE. I 
cannot make the field `final` because the compiler errors in the catch block 
that the field hasn't been initialized, but static analysis agrees with 
@Apache9 that the field can never be null.




-- 
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