From 4a14cf34a0bcd6c50bed768a5ed7ea2683af0274 Mon Sep 17 00:00:00 2001 From: Julia Beliaeva Date: Wed, 10 Oct 2018 17:30:11 +0300 Subject: [PATCH] [file-history] fix comparison between two revisions where file was deleted In this case, both before and after revisions are null. EA-129345 --- .../impl/src/com/intellij/vcs/log/history/FileHistoryUtil.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/platform/vcs-log/impl/src/com/intellij/vcs/log/history/FileHistoryUtil.java b/platform/vcs-log/impl/src/com/intellij/vcs/log/history/FileHistoryUtil.java index 6d0c25cfdd78..e1a851835c79 100644 --- a/platform/vcs-log/impl/src/com/intellij/vcs/log/history/FileHistoryUtil.java +++ b/platform/vcs-log/impl/src/com/intellij/vcs/log/history/FileHistoryUtil.java @@ -89,8 +89,9 @@ public class FileHistoryUtil { } List parentHashes = map(parentCommits, c -> logData.getCommitId(c).getHash()); - List parentChanges = map2List(toCollection(zip(parentCommits, parentHashes)), parent -> { + List 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) {