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

    https://github.com/apache/storm/pull/2754#discussion_r209075962
  
    --- Diff: 
storm-webapp/src/main/java/org/apache/storm/daemon/logviewer/utils/LogCleaner.java
 ---
    @@ -223,8 +246,8 @@ void cleanupEmptyTopoDirectory(File dir) throws 
IOException {
     
         @VisibleForTesting
         FileFilter mkFileFilterForLogCleanup(long nowMillis) {
    -        final long cutoffAgeMillis = cleanupCutoffAgeMillis(nowMillis);
    -        return file -> !file.isFile() && 
lastModifiedTimeWorkerLogdir(file) <= cutoffAgeMillis;
    +        //Doesn't it make more sense to do file.isDirectory here?
    --- End diff --
    
    I don't know if there are cases where a file is not a directory, and isFile 
would return false. Up to you.


---

Reply via email to