You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "danny0405 (via GitHub)" <gi...@apache.org> on 2023/02/21 09:07:07 UTC

[GitHub] [hudi] danny0405 commented on a diff in pull request #7840: [MINOR] Close InflaterInputStream in finally when calling decompressBytes in BitCaskDiskMap

danny0405 commented on code in PR #7840:
URL: https://github.com/apache/hudi/pull/7840#discussion_r1112766344


##########
hudi-common/src/main/java/org/apache/hudi/common/util/collection/BitCaskDiskMap.java:
##########
@@ -452,6 +452,8 @@ private byte[] decompressBytes(final byte[] bytes) throws IOException {
         return decompressBaos.toByteArray();
       } catch (IOException e) {
         throw new HoodieIOException("IOException while decompressing bytes", e);
+      } finally {

Review Comment:
   Does the code
   ```java
   try (InputStream in = new InflaterInputStream(new ByteArrayInputStream(bytes))) {
   }
   ```
   
   work correctly 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.

To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org

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