Github user d2r commented on a diff in the pull request:

    https://github.com/apache/storm/pull/1074#discussion_r52499408
  
    --- Diff: storm-core/src/jvm/org/apache/storm/utils/Utils.java ---
    @@ -884,26 +955,8 @@ private static void unTarUsingJava(File inFile, File 
untarDir,
                     entry = tis.getNextTarEntry();
                 }
             } finally {
    -            cleanup(tis, inputStream);
    -        }
    -    }
    -
    -    /**
    -     * Close the Closeable objects and <b>ignore</b> any {@link 
IOException} or
    -     * null pointers. Must only be used for cleanup in exception handlers.
    -     *
    -     * @param closeables the objects to close
    -     */
    -    private static void cleanup(java.io.Closeable... closeables) {
    -        for (java.io.Closeable c : closeables) {
    -            if (c != null) {
    -                try {
    -                    c.close();
    -                } catch (IOException e) {
    -                    LOG.debug("Exception in closing " + c, e);
    -
    -                }
    -            }
    +            tis.close();
    +            inputStream.close();
    --- End diff --
    
    Do we need null checks here when we call close? I think something could go 
wrong before they are assigned.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to