[file-history] fix comparison between two revisions where file was deleted

In this case, both before and after revisions are null.

EA-129345
This commit is contained in:
Julia Beliaeva
2018-10-10 17:34:19 +03:00
parent 5bc311066b
commit 4a14cf34a0
@@ -89,8 +89,9 @@ public class FileHistoryUtil {
}
List<Hash> parentHashes = map(parentCommits, c -> logData.getCommitId(c).getHash());
List<Change> parentChanges = map2List(toCollection(zip(parentCommits, parentHashes)), parent -> {
List<Change> parentChanges = mapNotNull(toCollection(zip(parentCommits, parentHashes)), parent -> {
ContentRevision beforeRevision = createContentRevision(parent.second, parent.first, visiblePack, diffHandler);
if (afterRevision == null && beforeRevision == null) return null;
return new Change(beforeRevision, afterRevision);
});
if (parentChanges.size() <= 1) {