You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2021/05/18 09:27:27 UTC

[GitHub] [hudi] yanghua commented on a change in pull request #2962: [HUDI-1913] Using streams instead of loops for input/output

yanghua commented on a change in pull request #2962:
URL: https://github.com/apache/hudi/pull/2962#discussion_r634195461



##########
File path: hudi-cli/src/main/java/org/apache/hudi/cli/utils/InputStreamConsumer.java
##########
@@ -41,11 +40,8 @@ public void run() {
     try {
       InputStreamReader isr = new InputStreamReader(is);
       BufferedReader br = new BufferedReader(isr);
-      String line;
-      while ((line = br.readLine()) != null) {
-        LOG.info(line);
-      }
-    } catch (IOException ioe) {
+      br.lines().forEach(LOG::info);
+    } catch (Exception ioe) {

Review comment:
       `ioe` -> `e`?




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org