diff --git a/src/main/java/jenkins/plugins/slack/ActiveNotifier.java b/src/main/java/jenkins/plugins/slack/ActiveNotifier.java index e4515e58..e7d97723 100755 --- a/src/main/java/jenkins/plugins/slack/ActiveNotifier.java +++ b/src/main/java/jenkins/plugins/slack/ActiveNotifier.java @@ -17,6 +17,7 @@ import hudson.tasks.test.TestResult; import hudson.triggers.SCMTrigger; import hudson.util.LogTaskListener; +import org.apache.commons.collections.CollectionUtils; import org.apache.commons.lang.StringUtils; import org.jenkinsci.plugins.displayurlapi.DisplayURLProvider; @@ -138,7 +139,9 @@ String getChanges(AbstractBuild r, boolean includeCustomMessage) { Entry entry = (Entry) o; logger.info("Entry " + o); entries.add(entry); - files.addAll(entry.getAffectedFiles()); + if (CollectionUtils.isNotEmpty(entry.getAffectedFiles())) { + files.addAll(entry.getAffectedFiles()); + } } if (entries.isEmpty()) { logger.info("Empty change...");