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

    https://github.com/apache/storm/pull/1074#discussion_r52217269
  
    --- Diff: storm-core/src/jvm/org/apache/storm/utils/Utils.java ---
    @@ -1370,9 +1469,974 @@ public static int toPositive(int number) {
         public static RuntimeException wrapInRuntime(Exception e){
             if (e instanceof RuntimeException){
                 return (RuntimeException)e;
    -        }else {
    +        } else {
                 return new RuntimeException(e);
             }
         }
    -}
     
    +    /**
    +     * Determines if a zip archive contains a particular directory.
    +     *
    +     * @param zipfile path to the zipped file
    +     * @param target directory being looked for in the zip.
    +     * @return boolean whether or not the directory exists in the zip.
    +     */
    +    public static boolean zipDoesContainDir(String zipfile, String target) 
throws IOException {
    +        List<ZipEntry> entries = (List<ZipEntry>)Collections.list(new 
ZipFile(zipfile).entries());
    +
    +        if(entries == null) {
    --- End diff --
    
    When will this ever be null?


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to