You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by GitBox <gi...@apache.org> on 2019/03/26 01:48:56 UTC

[GitHub] [calcite-avatica] leonliao commented on a change in pull request #90: [CALCITE-2950] Avatica DriverVersion.load leaks InputStream

leonliao commented on a change in pull request #90: [CALCITE-2950] Avatica DriverVersion.load leaks InputStream
URL: https://github.com/apache/calcite-avatica/pull/90#discussion_r268917306
 
 

 ##########
 File path: core/src/main/java/org/apache/calcite/avatica/DriverVersion.java
 ##########
 @@ -96,8 +96,9 @@ public static DriverVersion load(
     int minorVersion = 0;
     int databaseMajorVersion = 0;
     int databaseMinorVersion = 0;
+    InputStream inStream = null;
     try {
-      final InputStream inStream =
+      inStream =
 
 Review comment:
   Yes, you are right. I just checked https://calcite.apache.org/avatica/develop/avatica.html#download-source-build-and-run-tests, the required Java version is (JDK 1.8 or later, 1.9 preferred). Then try-with-resources is preferred here. 

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


With regards,
Apache Git Services