Avoid NPE when ChangeData.commitFooters() returns null
Change-Id: I02d1e43dfa507e16c51dab6b27005fe5760ab93b
This commit is contained in:
@@ -37,9 +37,6 @@ public class TrackingFooters {
|
|||||||
|
|
||||||
public ListMultimap<String, String> extract(List<FooterLine> lines) {
|
public ListMultimap<String, String> extract(List<FooterLine> lines) {
|
||||||
ListMultimap<String, String> r = MultimapBuilder.hashKeys().arrayListValues().build();
|
ListMultimap<String, String> r = MultimapBuilder.hashKeys().arrayListValues().build();
|
||||||
if (lines == null) {
|
|
||||||
return r;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (FooterLine footer : lines) {
|
for (FooterLine footer : lines) {
|
||||||
for (TrackingFooter config : trackingFooters) {
|
for (TrackingFooter config : trackingFooters) {
|
||||||
|
@@ -543,10 +543,11 @@ public class ChangeData {
|
|||||||
return commitMessage;
|
return commitMessage;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Returns the list of commit footers (which may be empty). */
|
||||||
public List<FooterLine> commitFooters() {
|
public List<FooterLine> commitFooters() {
|
||||||
if (commitFooters == null) {
|
if (commitFooters == null) {
|
||||||
if (!loadCommitData()) {
|
if (!loadCommitData()) {
|
||||||
return null;
|
return ImmutableList.of();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return commitFooters;
|
return commitFooters;
|
||||||
|
Reference in New Issue
Block a user