Github user revans2 commented on a diff in the pull request:
https://github.com/apache/storm/pull/2148#discussion_r120174827
--- Diff:
storm-server/src/main/java/org/apache/storm/localizer/Localizer.java ---
@@ -226,9 +218,8 @@ public boolean accept(File dir, String name) {
protected void reconstructLocalizedResources() {
try {
LOG.info("Reconstruct localized resource: " +
getUserCacheDir().getPath());
- File[] users = readDirContents(getUserCacheDir().getPath());
-
- if (users != null) {
+ Collection<File> users =
ConfigUtils.readDirFiles(getUserCacheDir().getPath());
+ if (users == null || users.isEmpty()) {
--- End diff --
This can be reverted. The only need was to check for null so we don't NPE.
This inverted the check.
---
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.
---