Skip to content

Commit

Permalink
Merge PR #197 Fix #62 by excluding empty affected
Browse files Browse the repository at this point in the history
files collection.
  • Loading branch information
samrocketman committed Mar 2, 2017
2 parents 71c8ecd + 0c6b4a7 commit c419e9d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main/java/jenkins/plugins/slack/ActiveNotifier.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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...");
Expand Down

0 comments on commit c419e9d

Please sign in to comment.