Avoid NPE when ChangeData.commitFooters() returns null

Change-Id: I02d1e43dfa507e16c51dab6b27005fe5760ab93b
This commit is contained in:
Joerg Zieren
2019-09-16 16:09:13 +02:00
parent 84c535cd45
commit 4c7f255124
2 changed files with 2 additions and 4 deletions

View File

@@ -37,9 +37,6 @@ public class TrackingFooters {
public ListMultimap<String, String> extract(List<FooterLine> lines) {
ListMultimap<String, String> r = MultimapBuilder.hashKeys().arrayListValues().build();
if (lines == null) {
return r;
}
for (FooterLine footer : lines) {
for (TrackingFooter config : trackingFooters) {

View File

@@ -543,10 +543,11 @@ public class ChangeData {
return commitMessage;
}
/** Returns the list of commit footers (which may be empty). */
public List<FooterLine> commitFooters() {
if (commitFooters == null) {
if (!loadCommitData()) {
return null;
return ImmutableList.of();
}
}
return commitFooters;