JiajunBernoulli commented on code in PR #3627:
URL: https://github.com/apache/calcite/pull/3627#discussion_r1452218834


##########
plus/src/main/java/org/apache/calcite/adapter/os/SqlShell.java:
##########
@@ -118,17 +118,18 @@ private static String model() {
   /** Main entry point. */
   @SuppressWarnings("CatchAndPrintStackTrace")
   public static void main(String[] args) {
-    try (PrintWriter err =
-             new PrintWriter(
-                 new OutputStreamWriter(System.err, StandardCharsets.UTF_8));
-         InputStreamReader in =
-             new InputStreamReader(System.in, StandardCharsets.UTF_8);
-         PrintWriter out =
-             new PrintWriter(
-                 new OutputStreamWriter(System.out, StandardCharsets.UTF_8))) {
+    try {
+      final PrintWriter err =
+          new PrintWriter(
+              new OutputStreamWriter(System.err, StandardCharsets.UTF_8));

Review Comment:
   Previously, `try-with-resource` syntax will close stream, 
   but now we haven't closed them.
   
   Should we close them?



-- 
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: commits-unsubscr...@calcite.apache.org

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

Reply via email to