Github user srdo commented on a diff in the pull request: https://github.com/apache/storm/pull/2754#discussion_r209075463 --- Diff: storm-webapp/src/main/java/org/apache/storm/daemon/logviewer/utils/LogCleaner.java --- @@ -235,7 +258,7 @@ FileFilter mkFileFilterForLogCleanup(long nowMillis) { private long lastModifiedTimeWorkerLogdir(File logDir) { long dirModified = logDir.lastModified(); - DirectoryStream<Path> dirStream = null; + DirectoryStream<Path> dirStream; try { dirStream = directoryCleaner.getStreamForDirectory(logDir); --- End diff -- I don't think this can return null, so might as well use try-with-resources for this. Also the null check on dirStream a few lines below should be unnecessary.
---